Adds metric tags to storage instrumentation#9595
Merged
Merged
Conversation
Contributor
Author
|
@ReubenBond, could I trouble you to have a look at this PR? |
ReubenBond
reviewed
Jul 8, 2025
Member
|
Thanks for the ping, @cdemi - I left a comment. I believe we should address that before merge |
Contributor
Author
|
Thanks for the feedback, @ReubenBond! I have made changes according to your feedback. I can't pass |
ReubenBond
reviewed
Jul 10, 2025
Member
|
Thanks, @cdemi! I added one last comment, otherwise LGTM |
Contributor
Author
|
You're absolutely right. Should be OK now |
It's clearer that we are referring to the type name of the provider and not the user-defined name given to the provider during configuration
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR aims to add support for tagging telemetry with contextual metadata (Storage Provider Name, State Name and State Type).
The current telemetry for storage operations (read/write/delete/errors) provides aggregate insights but lacks the granularity needed to troubleshoot issues or analyze behavior per provider or state.
This will enable, for example, Prometheus queries like:
I think it will be very useful for identifying noisy or error-prone storage providers, differentiating latency by grain state type or maybe alerting on specific grain state issues.
The
StateStorageBridge<TState>constructs the tag array once per instance and reuses it for all metric operations. Since I made changes here I also changed the storage provider type name.GetType().Nameto be computed once during construction instead of on every operation, reducing redundant string allocationsMicrosoft Reviewers: Open in CodeFlow