'Durable Function Doesn't Correlate Telemetry
According to this developer blog post Durable functions can be configured (and according the the host.json schema are configured by default) to automatically create and correlate trace telemetry with the W3C tracing protocol.
Currently, my host.json
looks like this, and includes the properties shown in the blog.
{
"version": "2.0",
"logging": {
"applicationInsights": {
"httpAutoCollectionOptions": {
"enableW3CDistributedTracing": true
},
"samplingExcludedTypes": "Request",
"samplingSettings": {
"isEnabled": true
}
},
"logLevel": {
"default": "Information",
"blueprints_webcp_gateway": "Debug"
}
},
"functionTimeout": "00:10:00",
"extensions": {
"queues": {
"visibilityTimeout": "00:00:10",
"batchSize": 4
},
"durableTask": {
"tracing": {
"DistributedTracingProtocol": "W3CTraceContext"
}
}
}
}
Yet, when I go to the Activity Log page in Azure Portal, each orchestrator and activity shows up as its own operation, which is definitely not what I'm expecting to see. Is any additional configuration needed? As far as I can tell, telemetry logged by the durable function host should be correlated by default.
Solution 1:[1]
I face same issue and have exactly same results(durable functions traces have different OperationId). Have not found the solution in bigger project I am working on. We have created smaller project to try full end-to-end functionality in more clear environment. I found out that some packages may break the correlation of DF traces f.e. (System.DiagnosticTool >= 4.7.0, MS.Azure.ServiceBus - this SDK is whole deprecated, ...) But there is a light in the end of the tunnel. When I have upgraded each package, target framework and version of Azure functions everything was working correctly in our smaller project. To update everything and make it work in bigger project will be another challenge.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jakub Majsniar |