You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide the steps required to reproduce the problem:
Use Node.js applicationinsights v2.5.1+ autocollection feature in an Azure Function. Log the return value of appinsights.getCorrelationContext() in the app which will make the problem later easier to see.
Run the Azure Function locally with azure-functions-core-tools
getCorrelationContext() will return null
Downgrade applicationinsights to 2.5.0
getCorrelationContext() will return the expected value
Details
Please see the linked issue above which has a full trace of the problem. This is a problem with multiple packages overwriting globals and not playing nice with each other. Both packages can probably do something to improve the situation and make this sort of issue less likely to occur. Neither package is an issue on its own, but when both try to overwrite the same global in different ways, the issue appears.
The text was updated successfully, but these errors were encountered:
I took a look and commented on the linked issue. This has already been fixed in require-in-the-middle and we just need to wait for the fix to propagate through the dependencies.
As mentioned, the current suggested workaround is to downgrade the applicationinsights package to v2.5.0
I took a look and commented on the linked issue. This has already been fixed in require-in-the-middle and we just need to wait for the fix to propagate through the dependencies.
As mentioned, the current suggested workaround is to downgrade the applicationinsights package to v2.5.0
How do we do this? I don't see applicationinsights in package.json
Full details of issue here: microsoft/ApplicationInsights-node.js#1144
Repro steps
Provide the steps required to reproduce the problem:
appinsights.getCorrelationContext()
in the app which will make the problem later easier to see.azure-functions-core-tools
getCorrelationContext()
will return nullgetCorrelationContext()
will return the expected valueDetails
Please see the linked issue above which has a full trace of the problem. This is a problem with multiple packages overwriting globals and not playing nice with each other. Both packages can probably do something to improve the situation and make this sort of issue less likely to occur. Neither package is an issue on its own, but when both try to overwrite the same global in different ways, the issue appears.
The text was updated successfully, but these errors were encountered: