-
Notifications
You must be signed in to change notification settings - Fork 70
chore: tracing implementation POC #4094
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
Draft
diegomarquezp
wants to merge
76
commits into
main
Choose a base branch
from
observability/tracing-noop-2
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.
Draft
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
e01ca06
feat(observability): add no-op implementation of tracing
diegomarquezp d3f61d1
chore: add otel tracing recorder
diegomarquezp cf98e86
chore: add javadocs
diegomarquezp 523c301
chore: adjust tests and conform more closely to metrics counterpart.
diegomarquezp d9534bd
chore: expand imports in otel it
diegomarquezp 196d591
Update gax-java/gax/src/main/java/com/google/api/gax/tracing/OpenTele…
diegomarquezp ea075d3
test: use tracer provider in ItOtelMetrics
diegomarquezp 2997153
Merge branch 'observability/tracing-noop' of https://github.com/googl…
diegomarquezp 2c26971
chore: format
diegomarquezp 1a76c29
chore: generate libraries at Thu Jan 8 19:39:27 UTC 2026
cloud-java-bot 8a0f855
chore: add dummy tracing metric
diegomarquezp dc3ed42
chore: refine tracing IT
diegomarquezp 5287f82
feat: add composite api tracer
diegomarquezp ce2d85b
test: use global config for tracing
diegomarquezp d6341cc
chore: restore metrics it
diegomarquezp a9c70ab
chore: format
diegomarquezp 69a7fa4
Merge branch 'observability/tracing-noop' of https://github.com/googl…
diegomarquezp a6716b4
chore: format ii
diegomarquezp 99bfd5b
chore: generate libraries at Mon Jan 12 21:30:41 UTC 2026
cloud-java-bot 7b5709b
Merge branch 'observability/tracing-noop' of https://github.com/googl…
diegomarquezp 6259b86
fix: Create a single S2AChannelCredentials per application (#3989)
rmehta19 61c1671
feat: add org.json:json to third-party-dependencies pom (#4047)
chingor13 069bc77
build: Update macOS version in nightly workflow (#4048)
diegomarquezp f5f94d8
chore(deps): update upper bound dependencies file (#4052)
diegomarquezp 64685b5
deps: update google.http-client.version to 2.0.3 (#4054)
diegomarquezp 7869ed9
chore: update googleapis commit at Wed Dec 10 02:37:02 UTC 2025 (#4013)
cloud-java-bot 5218acb
chore(main): release 2.65.0 (#4058)
release-please[bot] 7686f7f
build: Skip clirr check for protobuf 4.x upgrade (#4061)
blakeli0 af882ca
docs: Update docs for GoogleCredentialsProvider#setScopesToApply (#4057)
blakeli0 7575f5c
chore(main): release 2.65.1-SNAPSHOT (#4060)
release-please[bot] 7d98fcc
build: Skip clirr check for downstream libraries (#4062)
blakeli0 24f7fc5
chore: Update protobuf runtime version to 4.33.4 in downstream checks…
blakeli0 cee4ad5
chore(main): release 2.65.1 (#4063)
release-please[bot] 7aa0ea5
chore: cleanup release-please config (#4002)
diegomarquezp 7f90d28
chore: generate libraries at Thu Jan 8 19:39:27 UTC 2026
cloud-java-bot d0b2eb3
chore: simplify implementation (no C3)
diegomarquezp ce9df43
Merge remote-tracking branch 'origin/main' into observability/tracing…
diegomarquezp b063a8d
chore: generate libraries at Wed Jan 21 20:06:59 UTC 2026
cloud-java-bot 5da1d58
Merge branch 'observability/tracing-noop' of https://github.com/googl…
diegomarquezp 8ffb32a
chore: adapt units in gax
diegomarquezp e3b2cda
chore: new option artifact-name for generator
diegomarquezp 92d56e7
chore: add artifact name property to ClientContext and StubSettings
diegomarquezp 5082240
chore: modify TracingTracerFactory
diegomarquezp e8d98b0
chore: remove initialization in client context
diegomarquezp 87a3f8c
Merge remote-tracking branch 'origin/main' into observability/tracing…
diegomarquezp 20461c1
chore: configure tracer factory in client context
diegomarquezp 40b74bd
chore: format
diegomarquezp d1967f7
chore: introduce span context
diegomarquezp f626d4b
chore: adjust compilation issues and format
diegomarquezp e9fe905
chore: add scope
diegomarquezp 09d1539
test: adjust goldens for pubsub
diegomarquezp a240c29
chore: suppress resource closed warning
diegomarquezp 2334254
feat: generate with artifact_name
diegomarquezp 3b8b665
chore: reset to minimal changes
diegomarquezp 974ea10
chore: reset client context and stub settings
diegomarquezp 502ef29
chore: add tests
diegomarquezp 9461fd1
chore: span name and attempt attributes
diegomarquezp d786485
chore: use operation and attempt specific names
diegomarquezp 33f346f
test: fix operation span
diegomarquezp 90fdcc5
chore: adapt failedEcho test
diegomarquezp 990af89
chore: format
diegomarquezp 5a11e8a
chore: fix tracing tests
diegomarquezp e42b2a0
chore: implement gcp.client.service
diegomarquezp bed4a65
chore: add gcp.client.language attribute
diegomarquezp 17743d1
chore: generate libraries at Thu Jan 29 16:56:49 UTC 2026
cloud-java-bot 1801667
Merge branch 'observability/tracing-noop-2' of https://github.com/goo…
diegomarquezp 3dc0f7a
chore: introduce server.port
diegomarquezp bfd68be
chore: add error.type
diegomarquezp b501f2a
chore: add rpc.system
diegomarquezp 421abc9
chore: add resend_count
diegomarquezp fc22be3
chore: add server.address
diegomarquezp 7fc007c
chore: add repo parameter in generator
diegomarquezp ab19aab
chore: use gapic properties
diegomarquezp a9db790
chore: format
diegomarquezp d969089
feat: generate repo in properties file
diegomarquezp d59a108
test: confirm behavior of repo span attribute
diegomarquezp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,7 @@ | |
| import com.google.api.gax.rpc.internal.QuotaProjectIdHidingCredentials; | ||
| import com.google.api.gax.tracing.ApiTracerFactory; | ||
| import com.google.api.gax.tracing.BaseApiTracerFactory; | ||
| import com.google.api.gax.tracing.OpenTelemetryTracingTracer; | ||
| import com.google.auth.ApiKeyCredentials; | ||
| import com.google.auth.CredentialTypeForMetrics; | ||
| import com.google.auth.Credentials; | ||
|
|
@@ -270,6 +271,25 @@ public static ClientContext create(StubSettings settings) throws IOException { | |
| backgroundResources.add(watchdog); | ||
| } | ||
|
|
||
| ApiTracerFactory tracerFactory = settings.getTracerFactory(); | ||
| if (tracerFactory != null) { | ||
| String rpcSystem = ""; | ||
| if ("grpc".equals(transportChannel.getTransportName())) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic would likely be better in the tracer factory constructor. |
||
| rpcSystem = "grpc"; | ||
| } else if ("httpjson".equals(transportChannel.getTransportName())) { | ||
| rpcSystem = "http"; | ||
| } | ||
|
|
||
| tracerFactory = | ||
| tracerFactory.withAttributes( | ||
| ImmutableMap.of(), | ||
| ImmutableMap.of( | ||
| OpenTelemetryTracingTracer.SERVER_ADDRESS_ATTRIBUTE, settings.getServerAddress(), | ||
| OpenTelemetryTracingTracer.SERVICE_NAME_ATTRIBUTE, settings.getServiceName(), | ||
| OpenTelemetryTracingTracer.PORT_ATTRIBUTE, String.valueOf(settings.getPort()), | ||
| OpenTelemetryTracingTracer.RPC_SYSTEM_ATTRIBUTE, rpcSystem)); | ||
| } | ||
|
|
||
| return newBuilder() | ||
| .setBackgroundResources(backgroundResources.build()) | ||
| .setExecutor(backgroundExecutor) | ||
|
|
@@ -284,7 +304,7 @@ public static ClientContext create(StubSettings settings) throws IOException { | |
| .setQuotaProjectId(settings.getQuotaProjectId()) | ||
| .setStreamWatchdog(watchdog) | ||
| .setStreamWatchdogCheckIntervalDuration(settings.getStreamWatchdogCheckIntervalDuration()) | ||
| .setTracerFactory(settings.getTracerFactory()) | ||
| .setTracerFactory(tracerFactory) | ||
| .setEndpointContext(endpointContext) | ||
| .build(); | ||
| } | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
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.
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.
I decided to enforce this input.