Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the PayloadMetrics class to record OpenTelemetry metrics for request and response payload body sizes in Google Cloud Storage, along with comprehensive unit tests and build file updates. The review feedback suggests simplifying the implementation and tests by directly using google::cloud::version_string() instead of defining and using a custom SemanticVersionString() helper.
Comment on lines
+46
to
+50
| std::string SemanticVersionString() { | ||
| return std::to_string(google::cloud::version_major()) + "." + | ||
| std::to_string(google::cloud::version_minor()) + "." + | ||
| std::to_string(google::cloud::version_patch()); | ||
| } |
There was a problem hiding this comment.
| opentelemetry::nostd::shared_ptr< | ||
| opentelemetry::metrics::MeterProvider> const& provider, | ||
| std::string server_address, std::string rpc_system) | ||
| : client_version_(SemanticVersionString()), |
Comment on lines
+148
to
+151
| std::string const expected_version = | ||
| std::to_string(google::cloud::version_major()) + "." + | ||
| std::to_string(google::cloud::version_minor()) + "." + | ||
| std::to_string(google::cloud::version_patch()); |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16712 +/- ##
========================================
Coverage 92.78% 92.79%
========================================
Files 2277 2279 +2
Lines 228147 228307 +160
========================================
+ Hits 211696 211861 +165
+ Misses 16451 16446 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cpriti-os
force-pushed
the
impl-storage-payload-metrics
branch
from
November 26, 2026 11:40
8067373 to
e0324ed
Compare
cpriti-os
force-pushed
the
impl-storage-payload-metrics
branch
from
November 27, 2026 11:10
e0324ed to
b728eaf
Compare
This branch has not been deployed
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.
Adds the internal
PayloadMetricsrecorder for the Storage OpenTelemetry payload body size histograms:gcp.storage.client.request.body.size(UInt64Histogram, unitBy)gcp.storage.client.response.body.size(UInt64Histogram, unitBy)Both histograms record logical payload byte counts (including
0-byte payloads) with the standard Storage base attributes (gcp.client.version,gcp.client.artifact,gcp.client.service,server.address) and operation attributes (rpc.system.name,gcp.storage.operation,gcp.client.method), propagating the explicitopentelemetry::context::Contextand safely no-oping when the provider, meter, or individual instruments are null.Also registers
payload_metrics.{h,cc,_test.cc}in Bazel and CMake build files.Created by cpriti-o11y-agent