-
Notifications
You must be signed in to change notification settings - Fork 369
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
OpenTelemetry Traces support #2496
Conversation
1b475c0
to
d25fb0d
Compare
Codecov Report
@@ Coverage Diff @@
## master #2496 +/- ##
==========================================
- Coverage 98.06% 98.04% -0.02%
==========================================
Files 1135 1143 +8
Lines 61702 62033 +331
Branches 2777 2801 +24
==========================================
+ Hits 60505 60822 +317
- Misses 1197 1211 +14
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Rebased on the latest |
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.
Reviewed this with @marcotc at a high level.
There's a lot to digest in the details (which I'm not fully knowledgeable), but overall the general strategy to patch into OTel over re-implementing the API seems sound; less brittle in regards to changes within OTel (needing to duplicate a lot of implementation to meet spec). It's also reassuring to see the OTel test suite passing in combination with these changes in our CI.
This should be sufficient for experimental support; we'll want to performance test this for stability and run in other environments to validate it before promoting support to "beta".
All-in-all awesome job on this @marcotc ! Really excited to see this in action! 😄
What does this PR do?
The PR is divided into compartmentalized commits, if you prefer reviewing one commit at a time.
This PR allows
ddtrace
users to use Datadog Tracing and OpenTelemetry Traces together.OpenTelemetry Traces created by the host application will be collected by
ddtrace
and sent to the Datadog UI without any code changes.Datadog and OpenTelemetry spans will form a single trace, with correct parenting being handled by
ddtrace
.To activate the OpenTelemetry Traces collection, run this line:
Motivation
OpenTelemetry is a vendor-agnostic instrumentation specification that is being widely supported across the tech community today.
We should support users that want to keep using this vendor-agnostic API while using Datadog to process the telemetry data created.
Additional Notes
This is the first version of OpenTelemetry Traces support. It will be released as experimental.
This PR includes:
ddtrace
integration enabled (bundle exec rake upstream:opentelemetry
).Examples (from the
integration
app)OpenTelemetry root span, with a Datadog child span:
Datadog root span, with an OpenTelemetry child span:
And because we handle trace parenting now, a baseline test case to ensure this PR didn't break pure OpenTelemetry parenting:
How to test the change?
integration/apps/opentelemetry
integration app, to see real spans in the Datadog UI.bundle exec rake upstream:opentelemetry
ensures no OpenTelemetry contract has been violated by this integration.