Suppressing Untraced Spans #1333
Replies: 1 comment 7 replies
-
From what I can tell, the way the So normally, this invisible span should not be exported, and any children won't be exported so long as the sampler takes the parent span's trace flags. However. The So, I think I understand both what's happening under the hood, and why you are surprised to see the spans. Intuitively, We might be able to fix this somehow, perhaps with an internal flag of some kind on the span which gets propagated unilaterally downwards, indicating that we are within an Have you tried |
Beta Was this translation helpful? Give feedback.
-
In order to debug an issue with an upstream sampling decision, I set the
OTEL_TRACES_SAMPLER=always_on
and noticed that some instrumentations where generating spans even though they were wrapped in anuntraced
block.Here is an example of traces generated by
Net::HTTP
instrumentation:https://github.com/open-telemetry/opentelemetry-ruby/blob/main/exporter/otlp/lib/opentelemetry/exporter/otlp/exporter.rb#L131
We programmatically disable tracing in this case because it is non-trivial for us to alter auto-instrumentation. I was surprised to see that the instrumentation generated spans ignored the non-recording parent.
Is this the behavior we should expect when using the
Always On
sampler with theuntraced
block?cc: @fbogsany our resident sampling expert
Beta Was this translation helpful? Give feedback.
All reactions