Cloud Spanner: Adds tracing #2677
Conversation
| <dependency> | ||
| <groupId>io.opencensus</groupId> | ||
| <artifactId>opencensus-api</artifactId> | ||
| <version>0.6.0</version> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| } | ||
|
|
||
| static void endSpanWithFailure(Span span, SpannerException e) { | ||
| span.end(EndSpanOptions.builder() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| .build()); | ||
| } | ||
|
|
||
| private static Status getOpenCensusStatus(ErrorCode code) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * environment required to show a consistent set of methods relating to Cloud Bigtable on the | ||
| * grpcz page. If HBase artifacts are present, this will add tracing metadata for HBase methods. | ||
| */ | ||
| private static void setupTracingConfig() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| } catch (RuntimeException e) { | ||
| TraceUtil.endSpanWithFailure(span, e); | ||
| throw e; | ||
| } |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| try (Scope s = tracer.withSpan(span)) { | ||
| com.google.spanner.v1.Session session = | ||
| runWithRetries( | ||
| new Callable<com.google.spanner.v1.Session>() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| <groupId>io.opencensus</groupId> | ||
| <artifactId>opencensus-api</artifactId> | ||
| <exclusions> | ||
| <exclusion> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * | ||
| * TODO: Remove this when we depend on gRPC 1.8 | ||
| */ | ||
| private static void setupTracingConfig() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@vam-google Thanks for the approval. I agree it does make the code less readable but this is a pretty important feature. |
In this PR: - Remove CLI in `generate_repo.py` and `generate_pr_description.py` since these CLIs are migrated to `entry_point.py`.
Replace old teams with new ones. b/479542582
Replace old teams with new ones. b/479542582
Change-Id: Icae25650f2f44f9ebb803da98b587074f91fbaba Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Rollback plan is reviewed and LGTMed - [ ] All new data plane features have a completed end to end testing plan Fixes #<issue_number_goes_here> ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
cc @tomayles @bogdandrutu