Repository navigation
Conversation
Extend `storage_internal::AttemptMetrics` with `RetryLabels` and
`RecordRetry()` for the `gcp.storage.client.retries` (`{retry}`)
OpenTelemetry counter.
[Generated-by: AI]
There was a problem hiding this comment.
Code Review
This pull request adds support for tracking client-initiated retry attempts in the Google Cloud Storage C++ SDK. It introduces a RetryLabels struct, adds a retries counter to AttemptMetrics, and implements the RecordRetry method to record retry attempts with relevant attributes (such as RPC system, operation, error type, and network path). It also refactors metric names into constants in metrics_constants.h and adds corresponding unit tests. There are no review comments to evaluate, and the changes conform to the repository's style guidelines.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16722 +/- ##
==========================================
+ Coverage 92.78% 92.80% +0.02%
==========================================
Files 2279 2279
Lines 228396 228461 +65
==========================================
+ Hits 211921 212033 +112
+ Misses 16475 16428 -47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Extends
storage_internal::AttemptMetricswithRetryLabels,RecordGrpcRetry(), andRecordHttpRetry()for thegcp.storage.client.retries(UInt64Counter, unit{retry}) OpenTelemetry counter.Records client-initiated retries with the standard Storage base attributes (
gcp.client.version,gcp.client.artifact,gcp.client.service,server.address) plusrpc.system.name,gcp.storage.operation,error.type, andnetwork.path, propagating the explicitopentelemetry::context::Contextand safely no-oping when the provider, meter, or instrument is null.Also consolidates
kAttemptsMetric,kErrorsMetric, andkRetriesMetricinmetrics_constants.h.Created by cpriti-o11y-agent