Skip to content

feat(bigtable): fix gRPC metrics export and Monarch ingestion - #2

Open
dandymar wants to merge 1 commit into
bigtable_grpc_metricsfrom
bigtable_grpc_metrics-fixes
Open

feat(bigtable): fix gRPC metrics export and Monarch ingestion#2
dandymar wants to merge 1 commit into
bigtable_grpc_metricsfrom
bigtable_grpc_metrics-fixes

Conversation

@dandymar

@dandymardandymar commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Fix multiple client-side schema and formatting issues in the gRPC OpenTelemetry exporter to enable successful metric ingestion into Google Cloud Monitoring / Monarch (cloud_prod):

  • Resource Type: Updated monitored resource type from "bigtable.googleapis.com/Client" to "bigtable_client" to align with GCM resource_types.gcl definitions.
  • Instance ID Resolution: Added fallback to extract instance_id and project_id from InstanceChannelAffinityOption when not present in gRPC point attributes.
  • Metric Name Formatting: Configured MetricNameFormatterOption to prepend "bigtable.googleapis.com/internal/client/" and convert dot separators to slashes.
  • Service Time Series: Enabled ServiceTimeSeriesOption(true) to route internal client metric exports via CreateServiceTimeSeries.
  • Region & Zone Normalization: Renamed label key from "location" to "region" and added GCP zone suffix stripping (e.g. "us-east1-c" to "us-east1") for proper Monarch regional aggregation.
  • Label Filtering: Expanded excluded_labels to filter out SDK auto-injected attributes (service_name, service_namespace, and monitored resource keys) that caused GCM ingestion rejections.
  • Hostname Key: Corrected label key from "hostname" to "host_name".
  • Disabled Extra Metrics: Disabled sent/rcvd message size metrics via DisableMetrics to reduce metric cardinality.
  • Tests & Benchmarks: Updated unit tests and configured 5s metric period in benchmarks for responsive testing.

This change is Reviewable

Fix multiple client-side schema and formatting issues in the gRPC
OpenTelemetry exporter to enable successful metric ingestion into
Google Cloud Monitoring / Monarch (cloud_prod):
- Resource Type: Updated monitored resource type from
"bigtable.googleapis.com/Client" to "bigtable_client" to align with
GCM resource_types.gcl definitions.
- Instance ID Resolution: Added fallback to extract instance_id and
project_id from InstanceChannelAffinityOption when not present in
gRPC point attributes.
- Metric Name Formatting: Configured MetricNameFormatterOption to
prepend "bigtable.googleapis.com/internal/client/" and convert dot
separators to slashes.
- Service Time Series: Enabled ServiceTimeSeriesOption(true) to route
internal client metric exports via CreateServiceTimeSeries.
- Region & Zone Normalization: Renamed label key from "location" to
"region" and added GCP zone suffix stripping (e.g. "us-east1-c" to
"us-east1") for proper Monarch regional aggregation.
- Label Filtering: Expanded excluded_labels to filter out SDK
auto-injected attributes (service_name, service_namespace, and
monitored resource keys) that caused GCM ingestion rejections.
- Hostname Key: Corrected label key from "hostname" to "host_name".
- Disabled Extra Metrics: Disabled sent/rcvd message size metrics via
DisableMetrics to reduce metric cardinality.
- Tests & Benchmarks: Updated unit tests and configured 5s metric
period in benchmarks for responsive testing.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dandymar