-
Notifications
You must be signed in to change notification settings - Fork 275
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
Experimental support for Apollo tracing over OTLP #4982
Conversation
This comment has been minimized.
This comment has been minimized.
CI performance tests
|
apollo-router/src/plugins/telemetry/tracing/apollo_telemetry.rs
Outdated
Show resolved
Hide resolved
apollo-router/src/plugins/telemetry/tracing/apollo_telemetry.rs
Outdated
Show resolved
Hide resolved
apollo-router/src/plugins/telemetry/tracing/apollo_telemetry.rs
Outdated
Show resolved
Hide resolved
apollo-router/src/plugins/telemetry/tracing/apollo_telemetry.rs
Outdated
Show resolved
Hide resolved
Note that this is very much unvetted and doesn’t quite compile yet.
ea8c4a2
to
b0755b2
Compare
b0755b2
to
376f480
Compare
…porter Which with my current skills means we’ll have to clone all of the spans. Possibly there is a way to use shared span pointers here instead but I’ll leave that for an optimization pass.
…es of LightSpanData’s
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.
It looks generally good, but I'm concerned about the lock around the export future. Maybe worth taking another look at that or at least convincing me that it works as you'd expect.
docs/source/configuration/telemetry/instrumentation/standard-instruments.mdx
Outdated
Show resolved
Hide resolved
resource_template: Resource::new([ | ||
KeyValue::new( | ||
"apollo.router.id", | ||
ROUTER_ID.get_or_init(Uuid::new_v4).to_string(), |
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.
This is initialised in a couple of places now. Let's have a fn router_id()
that contains ROUTER_ID.get_or_init(||Uuid::new_v4().to_string())
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.
SGTM 👍
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.
@@ -0,0 +1,519 @@ | |||
//! Be aware that this test file contains some fairly flaky tests which embed a number of |
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.
If the integration test runner was used rather than the test harness then all the tests could be isolated.
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.
Actually I haven't seen any flakiness TBH - I'll remove this line.
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.
During testing, we found that some spans were missing at the top-level. This means that our trace viewer is not able to connect the full trace tree and is rendered as an “invalid” trace. I’ll raise a discussion about whether users can inject additional spans between the request and the supergraph / execution spans which will end up breaking our tree.
… once we detect a signature
https://apollographql.atlassian.net/browse/ROUTER-348
As the ecosystem around OpenTelemetry (OTel) has been expanding rapidly, we are evaluating a migration of Apollo's internal tracing system to use an OTel-based protocol.
In the short-term, benefits include:
Long-term, we see this as a strategic enhancement to consolidate these 2 disparate tracing systems.
This will pave the way for future enhancements to more easily plug into the Studio trace visualizer.
Configuration
This change adds a new configuration option
experimental_otlp_tracing_sampler
. This can be used to senda percentage of traces via OTLP instead of the native Apollo Usage Reporting protocol. Supported values:
always_off
(default): send all traces via Apollo Usage Reporting protocol.always_on
: send all traces via OTLP.0.0 - 1.0
: the ratio of traces to send via OTLP (0.5 = 50 / 50).Note that this sampler is only applied after the common tracing sampler, for example:
Sample 1% of traces, send all traces via OTLP:
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩