question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Keep APM<>RUM link when using OpenTelemetry JS tracer

See original GitHub issue

In our web client we use RUM browser SDK alongside an OpenTelemetry JavaScript SDK. This OpenTelemetry tracer instruments fetch requests and appends x-datadog-trace-id and x-datadog-parent-id headers to them in order to link the client request spans with the server spans in APM.

However, when RUM is also enabled in our web client, RUM merges the values of the x-datadog-* headers with its own resulting both values separated by comma. This breaks span linkage on both our APM traces and RUM.

"x-datadog-origin": "opentelemetry-sdk-web, rum",
"x-datadog-parent-id": "12336011929620396511, 8863242246433125602",
"x-datadog-sampled": "1, 1",
"x-datadog-sampling-priority": "1, 1",
"x-datadog-trace-id": "12729276616416176546, 292731172712202065"

Could you consider adding a check so that if any of these headers are already present in the request to no overwrite them?

Thanks 🙇

@datadog/browser-rum-slim v4.6.1

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
bcaudancommented, Apr 11, 2022

Hi @bostondv,

What I’m hoping to do is maintain the backend trace link that shows up in RUM when looking a view waterfalls and resources as well as make the link to backend spans in our OpenTelemetry traces when viewing them in APM.

For your use case, a target integration could be to have:

  • open telemetry SDK tracing requests and sending spans to datadog servers
  • RUM browser SDK not tracing requests but attaching somehow the trace id generated by open telemetry to RUM events

We definitely plan to have a better integration with open telemetry so we want to address this use case but it is not in our current priorities right now.

We will keep you posted here when we will make some progress on this topic.

1reaction
naseemkullahcommented, Dec 27, 2022

I believe this can be closed via https://github.com/DataDog/browser-sdk/pull/1832 which allows browser-sdk to inject w3c context

Read more comments on GitHub >

github_iconTop Results From Across the Web

Instrumentation | OpenTelemetry
Node.js To initialize tracing with the Node.js SDK, first ensure you have the SDK ... If a TracerProvider is not created, the OpenTelemetry...
Read more >
OpenTelemetry and Distributed Tracing in JavaScript
This post covers how to configure OpenTelemetry in the front-end JavaScript and how to configure distributed tracing.
Read more >
OpenTelemetry integration | APM User Guide [8.5] - Elastic
This means trace data and metrics collected from your applications and ... Connect your OpenTelemetry collector instances to Elastic Observability using the ...
Read more >
How to Get Started with OpenTelemetry Node.js - Aspecto
We will then use OpenTelemetry js to generate spans, and send them ... npm install --save @opentelemetry/sdk-trace-node npm install --save ...
Read more >
datadog rum とは的價格和推薦,YOUTUBE和 顧問們這樣回答
「datadog rum とは」的推薦目錄:. datadog rum とは 在 Using Datadog RUM to track Core Web Vitals By Ben Michel ... 的評價. 社群媒體上有些相關的討論: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found