Skip to content

feat(storage): add StorageMetricsContext for operation metrics state - #14728

Open
nidhiii-27 wants to merge 7 commits into
feat/storage-metrics-context-error-mappingfrom
feat/storage-metrics-context
Open

nidhiii-27 wants to merge 7 commits into
feat/storage-metrics-context-error-mappingfrom
feat/storage-metrics-context

Conversation

@nidhiii-27

Copy link
Copy Markdown
Contributor

Introduces StorageMetricsContext for tracking per-operation and per-attempt OpenTelemetry metrics state.

  • Adds StorageMetricsContext to manage operation attributes, attempt counters, and durations.
  • Adds StorageMetricsContextTest unit tests.

Stacked on #14694.

@nidhiii-27
nidhiii-27 requested review from a team as code owners October 22, 2026 05:39

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces StorageMetricsContext and its corresponding unit tests to manage operation metric state across asynchronous and thread-hopping boundaries. The review feedback suggests simplifying the API surface of StorageMetricsContext by making the primary constructor private, relying on static factory methods, and refactoring from(ApiCallContext) to delegate directly to from(GrpcCallContext) to eliminate duplicate logic. Additionally, the feedback recommends updating the unit tests to utilize these static factory methods instead of constructors.

@nidhiii-27
nidhiii-27 force-pushed the feat/storage-metrics-context branch from f943017 to edb3def Compare October 22, 2026 05:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant