-
Notifications
You must be signed in to change notification settings - Fork 628
Add support for scope in cost-attribution usage tracker #5646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
electron0zero
merged 10 commits into
grafana:main
from
electron0zero:scope_in_cost_attr
Sep 15, 2025
Merged
Add support for scope in cost-attribution usage tracker #5646
electron0zero
merged 10 commits into
grafana:main
from
electron0zero:scope_in_cost_attr
Sep 15, 2025
Conversation
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
e2703c3 to
7ee61b3
Compare
mdisibio
reviewed
Sep 12, 2025
mdisibio
reviewed
Sep 12, 2025
knylander-grafana
approved these changes
Sep 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
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]