Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor to wrap client context in BigtableClientContext #2433

Merged
merged 5 commits into from
Nov 27, 2024

Conversation

mutianf
Copy link
Contributor

@mutianf mutianf commented Nov 27, 2024

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 as code owners 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
20 of 21 checks passed
@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 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: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants