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

feat: Add opt-in flag and ClientInterceptor to propagate trace context for Spanner end to end tracing #3162

Merged
merged 33 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
df54343
feat(spanner): Add x-goog-spanner-end-to-end-tracing header for reque…
nareshz Jun 3, 2024
b4864da
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Jun 13, 2024
290f01e
Add Grpc Telemetry client interceptor for trace context propagation
nareshz Jun 17, 2024
3c92b26
Remove print statement
nareshz Jun 17, 2024
3671173
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Jun 18, 2024
9379106
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Jun 25, 2024
5033b1b
copy grpc telemetry client interceptor code
nareshz Jul 10, 2024
d7c778a
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Jul 10, 2024
4613e29
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Jul 11, 2024
7c39b82
rename spanner option for end to end tracing
nareshz Jul 11, 2024
d2ac8b4
add test for custom client interceptor code
nareshz Jul 15, 2024
3eb5e47
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Jul 15, 2024
233acd2
resolve comments
nareshz Jul 17, 2024
71a8f39
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Aug 7, 2024
1883fed
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Aug 9, 2024
01aa679
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Aug 9, 2024
be7d426
Merge branch 'e2e-tracing-header' into grpc-telemetry-client-interceptor
nareshz Aug 9, 2024
ab71745
Make trace context interceptor conditional based on client opt-in
nareshz Aug 9, 2024
2035d59
resolve comments
nareshz Aug 9, 2024
6af5e04
reformat code
nareshz Aug 13, 2024
0aa51ff
resolve comments
nareshz Aug 14, 2024
39269c0
fix clirr build failure
nareshz Aug 14, 2024
d2fd1c8
fix lint errors
nareshz Aug 14, 2024
2b9409b
combine enable/disable fn into single fn
nareshz Aug 19, 2024
b62b3c0
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Aug 19, 2024
e12cd0f
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Aug 21, 2024
0446fb5
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Aug 21, 2024
aa729a0
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Aug 27, 2024
0febebc
Merge branch 'main' of https://github.com/googleapis/java-spanner int…
nareshz Sep 25, 2024
b3a6d31
Rename server side tracing to spanner tracing
nareshz Sep 25, 2024
117c279
Rename spanner tracing to end to end tracing
nareshz Sep 26, 2024
a982c69
fix comments
nareshz Sep 27, 2024
0a2622d
Fix lint error
nareshz Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions google-cloud-spanner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-context</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-grpc-1.6</artifactId>
<version>2.1.0-alpha</version>
nareshz marked this conversation as resolved.
Show resolved Hide resolved
</dependency>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import io.grpc.ClientInterceptor;
import io.opentelemetry.api.GlobalOpenTelemetry;
import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.instrumentation.grpc.v1_6.GrpcTelemetry;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
Expand Down Expand Up @@ -51,6 +52,7 @@ public static SpannerInterceptorProvider createDefault(OpenTelemetry openTelemet
defaultInterceptorList.add(
new LoggingInterceptor(Logger.getLogger(GapicSpannerRpc.class.getName()), Level.FINER));
defaultInterceptorList.add(new HeaderInterceptor(new SpannerRpcMetrics(openTelemetry)));
defaultInterceptorList.add(GrpcTelemetry.create(openTelemetry).newClientInterceptor());
return new SpannerInterceptorProvider(ImmutableList.copyOf(defaultInterceptorList));
}

Expand Down