Skip to content
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

Support changing the header used for Sentry tracing across network hops #5158

Closed
SoftMemes opened this issue May 24, 2022 · 4 comments
Closed

Comments

@SoftMemes
Copy link

Problem Statement

I have an existing setup where backend services have tracing enabled via OpenTelemetry, and is not using Sentry for tracing. I'm now looking to add Sentry to a browser UI that will interact with these services, and would like to be able to have the Sentry client traces play nice with the existing backend trace setup.

I appreciate that this setup will allow only partial visibility of traces in Sentry, and only partial visibility of traces in my existing setup, but having them tied together end-to-end would at least allow for easily identifying traces in my backend system relating to a request in the UI or vice versa.

Sentry is already using a format for trace headers compatible with the standard traceparent, which is used in my backend services, so if the Sentry instrumentation could be set to send this in the traceparent standard header instead of sentry-trace, things would "just work".

Solution Brainstorm

Make it possible to configure the header used by Sentry to send trace information on outbound requests and/or capture it on inbound requests to allow for compatibility with other setups across a larger system. In the simplest form this would just be another setting for "trace header".

@Lms24
Copy link
Member

Lms24 commented May 24, 2022

Hey @SoftMemes thanks for writing in. So what you're looking for would be a possibility to dynamically change the header name of sentry-trace (content stays the same), right? E.g. by adding a property in the Sentry.init() options?

I'll bring this suggestion up with the team. While I think it's worth considering, I can't make any promises if (when) we're going to implement it. If you happen to have some time, PRs are always welcome ;). Also, we're currently working hard on shipping v7 of the JS SDKs (see #4882) so this might take a little longer than usual.

FYI, we're currently in the process of adapting and integrating the W3C baggage spec header into our SDKs to propagate some more tracing-related data. Version 7.0.0-beta.2 of the SDK ships with a first step (see #5133) in that direction.

@smeubank
Copy link
Member

You can check out this project https://github.com/orgs/getsentry/projects/39/views/1 here and get links to ongoing work in the form of PoC PRs and developer specs for OTEL span transformation and trace propagation to use with Sentry. Would be happy to hear your thoughts.

have an existing setup where backend services have tracing enabled via OpenTelemetry

what type of applications are these? Node, python, ruby, Go?

@HazAT
Copy link
Member

HazAT commented Jan 26, 2023

OTEL is ready!
https://docs.sentry.io/platforms/node/performance/instrumentation/opentelemetry/

@HazAT HazAT closed this as completed Jan 26, 2023
@sandstrom
Copy link

sandstrom commented Sep 21, 2023

@HazAT Does Open Telemetry has a standardized header name, and if that's possible?

I'm also curious about renaming the sentry-trace header to something else?

I assume it's basically an UUID, but we'd preferably use a vendor-neutral name for that header, since other systems may also read it (for example Grafana Tempo).

Or is that the purpose of baggage, to be a vendor neutral header (and that sentry-trace will eventually be deprecated?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

5 participants