ApplicationInsights-node.js
ApplicationInsights-node.js copied to clipboard
Nodejs Durable function distributed log correlation needed
We are using Nodejs run time, azure durable function sdk v1.4.6 and application insight sdk v1.8.10. we are logging traces across trigger , orchestrator (single) & activity function (many) but the traces are not correlated across as orchestrator and each of activity function start its own new operation or correlation id and loses it old one from trigger.
Read the article, https://tsuyoshiushio.medium.com/durable-functions-distributed-tracing-71426fe2246f similar feature expected by us is going to be in GA in C#. likewise when can we expect it in nodejs.
Team Is there a way to correlate log across the (Durable functions) trigger , orchestrator and activity function in Nodejs application insight sdk/ some other way?
@mattmccleary can you take a look at this issue?, it would be good to allocate work for this to maintain feature parity with C# SDK
@hectorhdzg @mattmccleary - any updates?
it would be good to allocate work for this to maintain feature parity with C# SDK
This would be much appreciated!
CC @hazhzeng
Hi Team - any updates?
Hey @MuhamedSalihSeyedIbrahim (and anyone else who stumbles across this thread), I was able to get distributed log correlation working in NodeJS functions while using durable functions.
Using the context propagation described in the README of this repo on activity triggers will get you correlation of dependencies same as an http triggered function. In addition to that, however, setting a couple of values in your project's host.json will enable the correlation of the various orchestrations and activities. Mine looks something like this:
{
"version": "2.0",
"logging": {
"httpAutoCollectionOptions": {
"enableW3CDistributedTracing": true
}
}
},
"extensions": {
"durableTask": {
"tracing": {
"distributedTracingEnabled": true,
"distributedTracingProtocol": "W3CTraceContext"
}
}
}
}
@hectorhdzg / Team - Thanks for implementation
@GravlLift - I glad you're confirming it.
I have requested this feature 2y ago but now I am out of that project. Therefore I requesting you(@GravlLift/any dev who acheived this) (if you wish) Kindly attach a screen shot (if any) and sample config/code/deps versions used to achieve this correlation of logs, in this thread for record purpose and I shall close this issue.
This may help future devs!
Thanks!