Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

chore: refactor to wrap client context in BigtableClientContext#2433

Merged
gcf-merge-on-green[bot] merged 5 commits into
googleapis:mainfrom
mutianf:bigtablecontext
Nov 27, 2024
Merged

chore: refactor to wrap client context in BigtableClientContext#2433
gcf-merge-on-green[bot] merged 5 commits into
googleapis:mainfrom
mutianf:bigtablecontext

Conversation

@mutianf

@mutianf mutianf commented Nov 27, 2024

Copy link
Copy Markdown
Contributor

Refactor ClientContext creation.

We need to create OpenTelemetry before client context is created so we can inject the PerConnectionErrorTracker interceptor on the ManagedChannel.
We need to access the open telemetry instance later when we create the TracerFactory.

This PR creates a new BigtableCleintContext class that wraps gax ClientContext and OpenTelemetry so we can access both later to avoid creating a global open telemetry instance.

Also moved client context creation logic from EnhancedBigtableStub to BigtableClientContext.

@mutianf mutianf requested review from a team November 27, 2024 15:56
@product-auto-label product-auto-label Bot added size: l Pull request size is large. api: bigtable Issues related to the googleapis/java-bigtable API. labels Nov 27, 2024
@mutianf mutianf added the automerge Merge the pull request once unit tests and other checks pass. label Nov 27, 2024
@gcf-merge-on-green gcf-merge-on-green Bot merged commit bfa156d into googleapis:main Nov 27, 2024
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Nov 27, 2024
@mutianf mutianf deleted the bigtablecontext branch November 27, 2024 19:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigtable Issues related to the googleapis/java-bigtable API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants