Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.92k stars 439 forks source link

Enable Auto Dependnecy Tracking on Javascript worker #5901

Open TsuyoshiUshio opened 4 years ago

TsuyoshiUshio commented 4 years ago

What problem would the feature you're requesting solve? Please describe.

A customer want to track dependency telemetry on the Azure Functions with node. Even if we configured AppInsights by our selves, I doesn't inject the header related correlation.

Describe the solution you'd like

Currently, we can get TraceContext on the context object. I suppose, setCurrentContext() method might be required for tracking dependency telemetry for this class. https://github.com/microsoft/ApplicationInsights-node.js/blob/5bf1848be22418b74e67a422f6daed651314c2a5/AutoCollection/CorrelationContextManager.ts#L60

The ideal behavior is , dependency http outgoing request is automatically tracked with injecting correlation header info according to the config of Distributed Tracing on functions host side.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered. If it is not tracked, I'd like to configure AppInsigths by my self and can track the dependency telemetry with correlation.

Additional context

Add any other context or screenshots about the feature request here. This issue might be related. https://github.com/microsoft/ApplicationInsights-node.js/issues/585

yojagad commented 4 years ago

@TsuyoshiUshio It might make sense to open this in nodejs worker repo as well?