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

Correlation information is not being sent #1019

Closed
freerangeeggs opened this issue Aug 28, 2019 · 2 comments · Fixed by #1021

Comments

@freerangeeggs
Copy link
Contributor

commented Aug 28, 2019

I have an angular app calling a backend API, both log telemetry to their own instances of AI. I am attempting to have distributed tracing work across both. I am using AI-web 2.2.0 and AI-dotnet 2.10.0

This is what I see on the Front-end AI:
image

This is what I see when looking at AI for the API:
image

I expect to have the latter result in both AI instances.

As they are on different domains, I have enableCorsCorrelation set to true.

I can see the Request-Id and Request-Context are correctly being sent to my API, and my API returning Request-Context with an AppId and the API has exposed the Request-Context so the header can be read by xhr.getAllResponseHeaders()

When stepping through the code, I can see dependency.correlationContext is being set to the appId rather than dependency.target being appended with the appId.

When looking at the network traffic, correlationContext is not being sent to AI. I can see that the correlationContext is not being serialized on creation of the dependency envelope.

If I use fiddler to manually adjust the traffic:

  • Adding correlationContext to baseData has no effect.
  • Adjusting target to append | cid-v1:{APP_ID} DOES have the desired effect, and I can see the same telemetry in the front-end AI as I do in the AI of the API.

I have attempted to use a Telemetry Initializer to adjust the target so it includes the AppId, but it is overwritten before it is posted.

Where I notice that dependency.correlationContext is being set in favor of appending dependency.target, I see that this is a change as part of the vNext folder, should this be part of the current deployment?

@markwolff

This comment has been minimized.

Copy link
Collaborator

commented Aug 29, 2019

Thanks for the report. It seems this bit was commented out for some reason or another. I'll enable it for the next release

@freerangeeggs

This comment has been minimized.

Copy link
Contributor Author

commented Aug 31, 2019

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.