feat: add ordinal event dimension column - #40
Open
abnegate wants to merge 1 commit into
Open
Conversation
Gauges already split multi-node resources on ordinal. Counters such as dedicated-database inbound, outbound and compute need the same column so a chart can tell members apart. setup() adds it to existing event tables. The daily MV stays grouped on resource identity only, so billing still sums every member. Co-authored-by: Cursor <cursoragent@cursor.com>
Greptile SummaryThis PR promotes replica ordinal from a gauge-only dimension to a shared event and gauge dimension.
Confidence Score: 5/5The PR appears safe to merge; ordinal remains distinct in raw event series while unfiltered daily billing totals continue to include every member. The dimension is aligned across validation, extraction, schemas, indexes, adapters, and tests. Existing Database collections already had ordinal through the former gauge-specific setup, and ClickHouse correctly routes ordinal-dependent queries away from the daily table that intentionally omits it. Important Files Changed
Reviews (1): Last reviewed commit: "feat: add ordinal event dimension column" | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ordinaltoEVENT_COLUMNS, the event schema, and event indexes so additive counters (dedicated-database inbound / outbound / compute) can split per member the way gauges already do.setup()ADD COLUMN IF NOT EXISTSs it onto existing event tables. The daily MV stays grouped on resource identity only, so a billing sum without an ordinal filter still totals every member.Test plan
tests/Usage/MetricTest.phpandClickHouseColumnTypeTest.php(56 tests)testEventOrdinalSeparatesReplicaSeriesagainst ClickHouse (filter/groupBy/ unsplitsum)Made with Cursor