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

Question: outgoing traceparent header change unexpected? #1145

Open
vkstrm opened this issue May 16, 2023 · 2 comments
Open

Question: outgoing traceparent header change unexpected? #1145

vkstrm opened this issue May 16, 2023 · 2 comments

Comments

@vkstrm
Copy link

vkstrm commented May 16, 2023

We are having an issue with Azure(?) changing the traceparent header in the HTTP requests (sent using node-fetch) from an App Service to external non-Azure backends. I am expecting that the traceparent set as a header in a HTTP request is the same traceparent received at the endpoint, but this is not the case.

We are using OpenTelemetry to correlate between Service A and Service B. After manually creating a span using OpenTelemetry we use this span's ID as the span ID in the outgoing traceparent. However, the traceparent span ID received in Service B has the same ID as the Application Insights dependency trace. Turning off automatic dependency tracing does not help, it only means that I can't see that dependency trace. Because of this I assume that manual dependency tracing also wouldn't help, even if I haven't tried that.

Probably not directly related to this library but I guess I'm wondering if there is a way to control this behaviour, or if I'm misunderstanding how this tracing/correlation works? What component could be changing the traceparent on the way out?

distributedTracingMode is set to AI_AND_W3C, but no difference if it isn't.

@JacksonWeber
Copy link
Contributor

Hi @vkstrm, the setup you're describing should work. I'm curious which nodes in your architecture are using AppInsights and which are using OpenTelemetry.
It would be especially helpful if you could provide a simple reproducible environment so I can try to reproduce your issue.

@vkstrm
Copy link
Author

vkstrm commented May 26, 2023

We are using Application Insights for our App Service, but in the same App Service we are sending some OpenTelemetry traces to an external collector. I know there are ways to integrate OpenTelemetry more with AppInsights but we are using them separately.

I have created a repository with an example that reproduces the issue: https://github.com/vkstrm/appi-traceparent-issue
I hope it makes sense and works for you. The OpenTelemetry bit here is only using the Console exporter so it won't show up anywhere, but the concept is the same with the creation of the spans.

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

No branches or pull requests

2 participants