Otel PropagatedSpan(NoOp) is created for HTTP requests with sampled traceflag

35 views Asked by At

I have a spring boot application using otel sdk 1.23.1, and using the AppInsight agent (v3.4.16). When a HTTP request with a traceparent with sampled flag (e.g. 00-155346606a87c80bab0c375534b1155e-1ad5743907b9fd93-01) is auto instrumented, a PropagatedSpan (which is essentially a NoOp span) is created.

This is preventing me from setting custom attributes and updating the status on the span - the "HTTP" request telemetry type (which is essential for monitoring false positives and setting error codes).

If, on the other hand, the traceflag=00 or traceparent is not available, an SdkSpan is created, which allows me to set custom attributes.

Questions:

  1. Why is a PropagatedSpan created for a sampled request?
  2. Is there any way to override this behaviour?
0

There are 0 answers