Skip to content

impl(bigtable): test grpc otel plugin configuration - #16347

Open
scotthart wants to merge 2 commits into
googleapis:mainfrom
scotthart:bigtable_grpc_otel_plugin_config_test
Open

impl(bigtable): test grpc otel plugin configuration#16347
scotthart wants to merge 2 commits into
googleapis:mainfrom
scotthart:bigtable_grpc_otel_plugin_config_test

Conversation

@scotthart

Copy link
Copy Markdown
Member

This PR factors out the configuration into a separate function that we can more easily test.

@scotthart
scotthart requested a review from a team as a code owner August 13, 2026 16:37
@product-auto-label product-auto-label Bot added the api: bigtable Issues related to the Bigtable API. label Aug 13, 2026

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

Copy link
Copy Markdown

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 refactors the gRPC metrics exporter by extracting the configuration logic of the OpenTelemetry plugin into a new GrpcMetricsPluginConfig struct and helper functions (MakeGrpcMetricsPluginConfig). It also adds corresponding unit tests to validate the configuration arguments. The feedback suggests passing the opentelemetry::sdk::resource::Resource object by value instead of by const reference in MakeGrpcMetricsPluginConfig to avoid unnecessary copies and allow moving it into the lambda function.

Comment thread google/cloud/bigtable/internal/grpc_metrics_exporter.h
Comment thread google/cloud/bigtable/internal/grpc_metrics_exporter.cc Outdated
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.80328% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.24%. Comparing base (acf90c3) to head (26153dd).

Files with missing lines Patch % Lines
...ud/bigtable/internal/grpc_metrics_exporter_test.cc 86.11% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16347   +/-   ##
=======================================
  Coverage   92.24%   92.24%           
=======================================
  Files        2227     2227           
  Lines      209543   209594   +51     
=======================================
+ Hits       193284   193337   +53     
+ Misses      16259    16257    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

api: bigtable Issues related to the Bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant