microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Distributed Tracing not working when using Service Bus topics

dicksongwong opened this issue · comments

I'm building microservices on Azure Functions 4.0 that communicate via Azure Service Bus. The operation id is carried through from one azure function to another when using service bus queues but once the message is published to a topic, the operation id resets for the subscriber and breaks the distributed tracing. Is this the expected behavior? Any workaround?

I think i solved it. When you use the azure output bindings for service bus topics, the Diagnostic-Id in the applicationProperties of the message gets set. We were using the client SDK which requires setting the Diagnostic-Id manually to the context.traceContext.traceParent