open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.75k stars 808 forks source link

How to add traceparent only to specific network urls? #5000

Open NatanCoralogix opened 1 month ago

NatanCoralogix commented 1 month ago

Currently, if enabled - the traceparent header is added to all requests. is there a way to specify which urls should be added? for example i have 50 requests, but only want to add the traceparent to 5 of them. i dont want to use the ignoreUrls, since i still need to monitor all.

Datadog has allowedTracingUrls which is a list of allowed urls, that would add the traceparent

Thanks for helping