Skip to content

Conversation

@mutianf
Copy link
Contributor

@mutianf mutianf commented Jan 6, 2026

Currently we have 2 otel instances that publishes built in metrics:

  • external OTEL: set on the tracer and collects metrics per request. Currently all the metrics on the external OTEL are published to BigtableTable schema.

  • internal OTEL: set on the channel provider and collects metrics periodically. Currently all the metrics on the internal OTEL are published to BigtableClient schema. (This was added because channel level metrics don't have information about bigtable resource ids, so the bigtable resource ids need to be hard coded when creating the OTEL, and CustomMetricsProvider doesn't have a way to create the OTEL instance with bigtable resource ids.)

The new batch flow control metrics are collected per request. The metrics also publish to BigtableClient schema. This means the current plumbing doesn't work anymore. This PR fixes the plumbing:

  1. Sets the internal OTEL on the tracer.
  2. Dynamically update the BigtableClient monitored resource labels with the value from the metric labels when publishing metrics to cloud monitoring. This is needed because of BigtableDataClientFactory.

Also fix the metric labels in the outstanding_rpc metric.

@mutianf mutianf requested review from a team as code owners January 6, 2026 02:39
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigtable Issues related to the googleapis/java-bigtable API. labels Jan 6, 2026
kongweihan
kongweihan previously approved these changes Jan 6, 2026
kongweihan
kongweihan previously approved these changes Jan 6, 2026
@mutianf mutianf requested a review from a team as a code owner January 8, 2026 18:42
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Jan 8, 2026
@mutianf mutianf changed the title fix: move batch metrics to internal views fix: publish batch flow control metrics Jan 8, 2026
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 googleapis/java-bigtable API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants