impl(bigtable): add outstanding_rpcs client schema metric - #16360
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces client schema metrics for Google Cloud Bigtable, specifically tracking outstanding RPCs using OpenTelemetry. It adds the client_schema_metrics implementation, headers, and unit tests, while integrating stub selection tracking into the OperationContext and Metric classes. Additionally, it refactors some loops in OperationContext to use C++17 structured bindings. Feedback on the pull request focuses on performance optimizations and code simplicity, such as returning char const* instead of std::string from static helper functions, simplifying label filtering to avoid complex abstractions, preventing unconditional fallback allocations in by_name calls, and using std::string_view in metadata processing to avoid unnecessary heap allocations.
colinmoy
left a comment
There was a problem hiding this comment.
Looks like adding the new StubSelection virtual method broke the bazel-otel-abi-2-pr check, so the ABI dump baselines need to be regenerated
So OpenTelemetry has both an ABI 1 and an ABI 2 (we may be able to stop supporting ABI 1 some day). The issue here was not all the methods in a testing Mock were overridden in ABI 2. I will likely write another PR that relocates the OTel mocks to testing_util to help future us not run into this again. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #16360 +/- ##
==========================================
- Coverage 92.24% 92.23% -0.02%
==========================================
Files 2234 2237 +3
Lines 210059 210251 +192
==========================================
+ Hits 193774 193930 +156
- Misses 16285 16321 +36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This PR adds the first client schema metric and the event (StubSelection) it records telemetry on.