Corellation Context cannot be accessed during azure functions preInvocation hooks
GravlLift opened this issue · comments
I'm using this package in azure functions and I'm attempting to set a custom property in the correlation context using Azure Functions preInvocation hook. However, the way this package works is that correlation contexts are only associated with the function handler via the wrapCallback
function:
ApplicationInsights-node.js/AutoCollection/AzureFunctionsHook.ts
Lines 67 to 99 in 0217324
So if I attempt to call getCorrelationContext
or startOperation
from my hook, I get a correllation context that only exists for the lifetime of my hook and is then lost.
Do you have any suggestions on how I might accomplish my objective (outside of explicitly setting custom properties at the start of all of my functions)?