[Monitor Opentelemetry] Question about ensuring trace correlation in Azure Functions #32896
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Monitor - Exporter
Monitor OpenTelemetry Exporter
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
I'm trying to achieve proper trace correlation in an Azure Function using the NodeJS worker.
The Azure Function runtime (host) logs the incoming HTTP request, while the NodeJS worker uses the Application Insights SDK (v3.x), which in turn leverages
useAzureMonitor
configured with the ApplicationInsightsSampler.It appears that this sampler may drop traces related to the Span Context opened by the Azure host (root HTTP request), as it does not retain samples based on parent spans. This could result in incomplete end-to-end traces when using Azure Functions even with the same
sampleRatio
configured for both host and worker.Would it be possible to use a
ParentBasedSampler
instead, to retain the full chain when the host sample the original request?The text was updated successfully, but these errors were encountered: