-
Notifications
You must be signed in to change notification settings - Fork 119
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 end to end tracing #3162
Merged
rahul2393
merged 33 commits into
googleapis:main
from
nareshz:grpc-telemetry-client-interceptor
Sep 27, 2024
Merged
feat: Add opt-in flag and ClientInterceptor to propagate trace context for Spanner end to end tracing #3162
rahul2393
merged 33 commits into
googleapis:main
from
nareshz:grpc-telemetry-client-interceptor
Sep 27, 2024
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
nareshz
force-pushed
the
grpc-telemetry-client-interceptor
branch
from
September 26, 2024 12:58
ffa6a3f
to
117c279
Compare
nareshz
changed the title
feat: Add opt-in flag and ClientInterceptor to propagate trace context for Spanner server side tracing
feat: Add opt-in flag and ClientInterceptor to propagate trace context for Spanner end to end tracing
Sep 27, 2024
rahul2393
removed
the
do not merge
Indicates a pull request not ready for merge, due to either quality or timing.
label
Sep 27, 2024
rahul2393
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Sep 27, 2024
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Sep 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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 side. The changes include:
Add
x-goog-spanner-end-to-end-tracing
header to Spanner RPC contexts.The header is added to support spanner 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 any of the following ways:
Opting-in while creating Spanner object.
Spanner spanner = SpannerOptions.newBuilder().setEnableEndToEndTracing(true).build().getService();
Set the
SPANNER_ENABLE_END_TO_END_TRACING
environment variable totrue
.For Spanner tracing feature,
traceparent
header is required on the Spanner layer in all the requests. This change helps in passingtraceparent
header inside Spanner requests if Context propagators are setup in OpenTelemetrySdk.traceparent
header will be only added if client has opted-in for spanner tracing by setting thesetEnableEndToEndTracing
option in SpannerOptions.