impl(bigtable): add grpc metrics exporter - #16288
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a GrpcMetricsExporter to support OpenTelemetry metrics for Bigtable gRPC clients. The implementation includes a registry to manage exporter lifetimes and deduplication, along with necessary build configuration updates. My review highlights several critical improvements: switching from std::weak_ptr to std::shared_ptr in the registry to prevent premature plugin shutdown, optimizing performance by returning const& for latency boundaries, reducing log verbosity, and adding defensive checks for variant attribute access to ensure stability.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16288 +/- ##
==========================================
- Coverage 92.31% 92.30% -0.01%
==========================================
Files 2223 2226 +3
Lines 208086 208440 +354
==========================================
+ Hits 192086 192396 +310
- Misses 16000 16044 +44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2b09639 to
92192f1
Compare
This is the first of several PRs to add support for exporting metrics collected by the gRPC metrics plugin. The gRPC plugin is implemented as a process wide singleton, per authority, so we have to add additional logic to ensure we only create it once, even though the application may create/destroy multiple Connections/Clients during its execution.
Additional integration testing will be added in a subsequent PR.