-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat: Add opt-in flag and ClientInterceptor to propagate trace context for Spanner server side tracing #3162
Open
nareshz
wants to merge
28
commits into
googleapis:main
Choose a base branch
from
nareshz:grpc-telemetry-client-interceptor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: Add opt-in flag and ClientInterceptor to propagate trace context for Spanner server side tracing #3162
nareshz
wants to merge
28
commits into
googleapis:main
from
nareshz:grpc-telemetry-client-interceptor
Conversation
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
…o e2e-tracing-header
…o grpc-telemetry-client-interceptor
product-auto-label
bot
added
size: xs
Pull request size is extra small.
api: spanner
Issues related to the googleapis/java-spanner API.
labels
Jun 18, 2024
product-auto-label
bot
added
size: m
Pull request size is medium.
and removed
size: xs
Pull request size is extra small.
labels
Jul 10, 2024
…o grpc-telemetry-client-interceptor
…o e2e-tracing-header
…o grpc-telemetry-client-interceptor
olavloite
reviewed
Jul 16, 2024
...-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerInterceptorProvider.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/TraceContextInterceptor.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/TraceContextInterceptor.java
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/TraceContextInterceptor.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/TraceContextInterceptor.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/TraceContextInterceptor.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/TraceContextInterceptor.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/TraceContextInterceptor.java
Outdated
Show resolved
Hide resolved
...-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerInterceptorProvider.java
Outdated
Show resolved
Hide resolved
…o e2e-tracing-header
…o e2e-tracing-header
…o grpc-telemetry-client-interceptor
product-auto-label
bot
added
size: l
Pull request size is large.
and removed
size: m
Pull request size is medium.
labels
Aug 9, 2024
nareshz
changed the title
feat: Add Grpc Telemetry client interceptor for trace context propagation
feat: Add opt-in flag and ClientInterceptor to propagate trace context for Spanner server side tracing
Aug 9, 2024
surbhigarg92
reviewed
Aug 9, 2024
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Outdated
Show resolved
Hide resolved
surbhigarg92
approved these changes
Aug 12, 2024
olavloite
approved these changes
Aug 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a couple of minor nits.
Oh, and please also fix the clirr build failure. For that, you need to add an exception to the clirr-ignored-differences.xml
file.
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Outdated
Show resolved
Hide resolved
…o grpc-telemetry-client-interceptor
…o grpc-telemetry-client-interceptor
…o grpc-telemetry-client-interceptor
…o grpc-telemetry-client-interceptor
rahul2393
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Sep 12, 2024
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Sep 12, 2024
rahul2393
added
the
do not merge
Indicates a pull request not ready for merge, due to either quality or timing.
label
Sep 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: spanner
Issues related to the googleapis/java-spanner API.
do not merge
Indicates a pull request not ready for merge, due to either quality or timing.
size: l
Pull request size is large.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR add changes required for enabling tracing on Spanner server side. The changes include:
Add
x-goog-spanner-end-to-end-tracing
header to Spanner RPC contexts.The header is added to support server side tracing feature, which aims to create trace spans at Spanner layer to provide more context to customers on their requests to Spanner.
This feature is off by default and can be enabled by enabling server side tracing while creating Spanner object.
Spanner spanner = SpannerOptions.newBuilder().enableServerSideTracing().build().getService();
For Server side tracing feature,
traceparent
header is required on the Spanner layer in all the requests. This change help in passingtraceparent
header inside Spanner requests if Context propagators are setup in OpenTelemetrySdk. These traceparent headers will be only added if client has opted-in for server side tracing by setting theenableServerSideTracing
option in SpannerOptions.