All,
I have some problem setting up end-2-end transaction monitoring in ApplicationInsights, it seems to break the end-2-end view on my ServiceFabric ApiGateway service (.net CORE). This results in 2 traces in AppInsights instead of 1 (which I want ;-).
Ok my setup:
So an external API (.net core) which communicates to a ApiGateway (.net core stateless service) in a SF cluster via HTTP. Within the SF cluster all service (stateless full .net) communication is via Remoting V2.
I setup ApplicationInsights using ex. : https://github.com/yantang-msft/service-fabric-application-insights-example
In ApplicationInsights I see 2 traces (which should be one), being:
It looks like the "Operation Id" is not reused when sending the message from the APIGateway down. Is AppInsights i can see the "Operation Id" differ.
Does anyone have a idea? An I missing something? Should I set the operation id on the outgoing request in the ApiGateway (and how can I do that ;-))
After some contact (https://github.com/microsoft/ApplicationInsights-ServiceFabric/issues/115) the issue became clear.
It's because of the new version of AppInsight is using a new protocol, which is in the .net version of the library. You can force AppInsights to use the "old" protocol and then the end to end trace works again. You can to this by setting the ActivityIDformat property to legacy one like below. (somewhere in app startup)
Activity.DefaultIdFormat = ActivityIdFormat.Hierrachical;
Activity.ForceDefaultIdFormat = true;