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:
- Why is a PropagatedSpan created for a sampled request?
- Is there any way to override this behaviour?