-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(spanner): implement custom tracer_provider injection for opentel…
…emetry traces (#1229) * all: implement custom tracer_provider injection An important feature for observability is to allow the injection of a custom tracer_provider instead of always using the global tracer_provider by sending in observability_options=dict( tracer_provider=tracer_provider, enable_extended_tracing=True, ) * Address review feedback by attaching observability_options to Client only * Attach observability_options directly before trace_call * More reverts for formatting * Plumb observability_options into _restart_on_unavailable * completely decouple observability_options from session * apply SPANNER_ENABLE_EXTENDED_TRACING but in inverse due to compatibility * Document SPANNER_ENABLE_EXTENDED_TRACING in environment * Revert a vestige of mock * tests: add unit test for propagating TracerProvider * Add preliminary end-to-end test to check for injection of observability_options * Document default enable_extended_tracing value * Carve out observability_options test * Ensure that observability_options test sets up and deletes database * Ensure instance.create() is invoked in system tests * Use getattr for mock _Client * Update with code review suggestions * Deal with mock.Mock false positives failing tests * Address review feedback
- Loading branch information
Showing
10 changed files
with
339 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.