fix(otel): OTel updateName now updates the Datadog span's resource name#8864
fix(otel): OTel updateName now updates the Datadog span's resource name#8864zacharycmontoya wants to merge 6 commits into
Conversation
… to update the DD span's resource name. Previously, this updated the operation name which was a bug
Overall package sizeSelf size: 6.2 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.2 | 85.93 kB | 825.11 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79a728ab79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🎉 All green!🧪 All tests passed 🔗 Commit SHA: d8efa10 | Docs | Datadog PR Page | Give us feedback! |
…ects the updated API implementation
BenchmarksBenchmark execution time: 2026-06-12 22:15:34 Comparing candidate commit d8efa10 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1451 metrics, 16 unstable metrics.
|
BridgeAR
left a comment
There was a problem hiding this comment.
I can not say much about the domain specific parts, you will know those better :)
The code is LGTM when we use a private property
link04
left a comment
There was a problem hiding this comment.
LGTM with some edge case and another cosmetic change.
…since it's only exercised by test code
…re updating the otel name
|
After further consideration, this update to the API should be behind a feature flag. I'll close this PR and leave the implementation in #8894 which already includes the fix and also introduces the feature flag. |
What does this PR do?
Previously, the
updateNamefunction in the OTel Bridge (which, as the name suggests, updates the OpenTelemetry span's name after span creation) would update the Datadog span's operation name, which is incorrect. The corresponding field in the Datadog span is the resource name, so this PR fixes the implementation to update the DD span's resource name.Note: This is a breaking change for users of this API because the "operation name" displayed in the UI will change. However, OpenTelemetry instrumentation libraries like
opentelemetry-instrumentation-expressuse this to update the span's name to match the endpoint, so this is behavior now aligns with expectations.Motivation
Exploratory testing of OpenTelemetry Instrumentation Libraries is being conducted via https://github.com/DataDog/evalya/pull/798 which exposed this bug. This issue appears regardless of the trace format (MsgPack or OTLP) so it should be fixed unconditionally in the OTel Tracing API layer.
Note: After testing in the linked evalya branch with this local change, the
namefields of the corresponding OTLP spans between the two SDKs now match.Additional Notes
N/A