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

Upgrading Application Insights breaks service correlation #115

Open
lindgrend opened this issue Nov 18, 2020 · 7 comments
Open

Upgrading Application Insights breaks service correlation #115

lindgrend opened this issue Nov 18, 2020 · 7 comments

Comments

@lindgrend
Copy link

We are running a service fabric cluster with the following values:
Microsoft.ServiceFabric: 6.4.638
Other service fabric nuget: 3.3.638
Microsoft.ApplicationInsights.ServiceFabric.Native 2.2.2
Application insights: 2.9.1
Microsoft.ApplicationInsights.AspNetCore: 2.6.1

This is running as expected
2 9 1

We now need to upgrade our application insights because of needing some later functionality and when we upgrade Application insights and Microsoft.ApplicationInsights.AspNetCore to 2.16.0 as only change the correlation between the services is gone.
2 16 0

This is making us having to choose between having correlation on our Service fabric services or our NServicebus integration and also blocking us for keeping Application insights up to date.

A minimum repo displaying this behavior can be found at:
https://github.com/lindgrend/AI.Repro

@yantang-msft
Copy link
Contributor

@lindgrend, most likely it's because the latest AppInsights sdk switched to W3C correlation header, which is not compatible with the correlation protocol in this SDK.
And there is currently no plan on supporting the new protocol for this SDK, so unfortunately, you'll have to choose between one of them.

@lindgrend
Copy link
Author

Am I understanding it correctly that it could be solved by upgrading Service fabric and would that include going to the next major release then?

@yantang-msft
Copy link
Contributor

It's correct it can be solved by implementing the new correlation protocol.
However, this repo is currently in maintenance mode only for bug fixes, there is no plan for next major release. :(

@DHoefakker
Copy link

@yantang-msft I hop on this issue based on a issue I encounter (https://stackoverflow.com/questions/66011506/applicationinsights-end-2-end-breaks-on-servicefabric-apigateway) which looks like this issue.

Could you clarify a thing
==> However, this repo is currently in maintenance mode only for bug fixes, there is no plan for next major release. :( <==

Does this mean there are no updates coming for ApplicationInsights for ServiceFabric? Because the documentation states that "The correlation HTTP protocol, also called Request-Id, is being deprecated".

What's the best way forward? Forcing it to the "old" correlation protocol?

Hope my question is clear, maybe I misunderstood it a bit ;-)

@yantang-msft
Copy link
Contributor

@DHoefakker I at one time saw there is a way to force using Request-Id in the doc, but last time I checked the doc again, I don't see it anymore. @cijothomas do you know how to enforce Request-Id protocol for the .net SDK?

@cijothomas
Copy link

@yantang-msft I believe ApplicationInsights still does request-id propagation along with traceparent. It would respect the ActivityID format set by the user. So one can set ActivityIDformat to legacy one like below. (somewhere in app startup)

Activity.DefaultIdFormat = ActivityIdFormat.Hierrachical;
Activity.ForceDefaultIdFormat = true;

If this doesn't work, please open an issue in the applicaiton insights repo.

@DHoefakker
Copy link

@cijothomas @yantang-msft Yes, setting the ActivityIDFormat did the trick 🥳

Beside that i am wondering does this mean there are no updates coming for ApplicationInsights for ServiceFabric? Or is it related to .net? Are you now focussing on .net core / .net 5, and maintaining only the .net < 4.x version ?

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

4 participants