Add support for scope in cost-attribution usage tracker#5646
Merged
electron0zero merged 10 commits intografana:mainfrom Sep 15, 2025
Merged
Add support for scope in cost-attribution usage tracker#5646electron0zero merged 10 commits intografana:mainfrom
electron0zero merged 10 commits intografana:mainfrom
Conversation
e2703c3 to
7ee61b3
Compare
mdisibio
reviewed
Sep 12, 2025
mdisibio
reviewed
Sep 12, 2025
knylander-grafana
approved these changes
Sep 14, 2025
Contributor
knylander-grafana
left a comment
There was a problem hiding this comment.
Thank you for updating the docs. I have a few minor suggestions to bring your doc in line with our style guide. Overall, great job! I'm going to approve the PR since I'm out of town and don't want to block your work.
mdisibio
approved these changes
Sep 15, 2025
davidham
added a commit
that referenced
this pull request
Sep 16, 2025
…grafana/tempo into feature/add-option-to-run-once-and-exit * 'feature/add-option-to-run-once-and-exit' of github.com:grafana/tempo: [tools] repalce missing golangci dependency with fork (#5653) feat: don't enqueue records to kafka when the context has been cancelled (#5499) Gracefully handle unsupported block encodings (#5543) vParquet5: dedicated columns for int values (#5639) Add support for scope in cost-attribution usage tracker (#5646) chore: refactor method to wait for a healthy broker (#5618) Update local docker-compose example to scrape /usage_metrics (#5643) Fix race condition in block-builder test (#5645) Upgrade parquet-go (#5644) Cleanup blocks on startup (#5642) Move tracing install to pkg/tracing (#5634)
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.
What this PR does:
Add support for scopes in the cost attribution dimensions attribute matching for cost attribution usage tracker.
Users can now configure dimensions with
resource.orspan.to only look for the attribute at span or resource level.With scoped configuration, you can configure tempo to look for values the requested scope and avoid unwanted overwrite from span attributes when the same attribute exists at both resource and span levels.
This change is backwards compatible, and if you need to look at both resource and span scope, you can keep using upscoped attribute in the configuration and it will work as it used to work before this change.
please refer to updated documentation to see more details.
note for reviewers:
CHANGELOG.mdhas few formatting fixes where extra whitespace is cleaned up by my IDE, you can clean the diff withHide whitespace changesin the diff view.Benchmarks
Micro benchmarks show almost no change in perf and allocations.
BenchmarkUsageTrackerCollect
BenchmarkUsageTrackerObserve
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]