Skip to content

feat: add google.bigtable.enable.internal.metrics config key - #4651

Open
igorbernstein2 wants to merge 1 commit into
mainfrom
feat/internal-metrics-config
Open

igorbernstein2 wants to merge 1 commit into
mainfrom
feat/internal-metrics-config

Conversation

@igorbernstein2

Copy link
Copy Markdown
Collaborator

Summary

Add a separate google.bigtable.enable.internal.metrics (BigtableOptionsFactory.BIGTABLE_ENABLE_INTERNAL_METRICS) configuration key to control built-in Cloud Monitoring metrics export (BigtableDataSettings.Builder#disableInternalMetrics()), independent of google.bigtable.enable.client.side.metrics.

Changes

  • BigtableOptionsFactory:
    • Added BIGTABLE_ENABLE_INTERNAL_METRICS = "google.bigtable.enable.internal.metrics" (enabled by default).
    • Updated Javadoc on BIGTABLE_ENABLE_CLIENT_SIDE_METRICS to clarify that it configures MetricsProvider to NoopMetricsProvider.INSTANCE and does not disable built-in Cloud Monitoring export controlled by BIGTABLE_ENABLE_INTERNAL_METRICS.
  • BigtableHBaseVeneerSettings:
    • Wired BIGTABLE_ENABLE_INTERNAL_METRICS in buildBigtableDataSettings(...) to call dataBuilder.disableInternalMetrics() when set to false, leaving BIGTABLE_ENABLE_CLIENT_SIDE_METRICS independent.
  • TestBigtableHBaseVeneerSettings:
    • Added unit tests covering default enabled state, disabling via "false", explicitly enabling via "true", and verifying BIGTABLE_ENABLE_CLIENT_SIDE_METRICS = "false" does not disable internal metrics.

Testing

  • Ran full bigtable-hbase unit test suite (mvn -pl bigtable-client-core-parent/bigtable-hbase -am test): 336 tests run, 0 failures, 0 errors (2 pre-existing @Ignore skipped).
  • Passed enforcer, checkstyle (0 violations), animal-sniffer (java18:1.0), javadoc:javadoc (0 warnings on modified files), and formatting checks.

@igorbernstein2
igorbernstein2 requested a review from a team as a code owner November 30, 2026 20:33
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: bigtable Issues related to the googleapis/java-bigtable-hbase API. labels Nov 30, 2026

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

Copy link
Copy Markdown
Contributor

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 introduces a new configuration option, BIGTABLE_ENABLE_INTERNAL_METRICS, to control whether built-in internal metrics are exported to Cloud Monitoring. It updates the documentation for client-side metrics to clarify the distinction, integrates the new setting into BigtableHBaseVeneerSettings, and adds corresponding unit tests to verify the default and explicit configurations. There are no review comments, so I have no feedback to provide.

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-hbase API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant