Fix sampling for child spans when using opencensus trace provider #13267
Labels
area/tracing
enhancement
Feature requests. Not bugs or questions.
stale
stalebot believes this issue/PR has not been touched recently
Title: Fix sampling for child spans when using Opencensus trace provider via https://github.com/envoyproxy/envoy/blob/v1.15.0/api/envoy/config/trace/v3/opencensus.proto
Description:
Opencensus trace provider honors envoy's trace sampling decision. But, there is an pending issue at their end census-instrumentation/opencensus-cpp#294 where the child span will always be sampled even if the parent span is not sampled. This leads to lots of orphan child spans which results in confusion.
When parent span is not sampled, child span will fall back either to the sampler present in startSpanOptions sent along while calling startSpan method OR to the default sampler configured at Opencensus traceOptions
IMO, there are 2 ways to solve this.
[optional Relevant Links:]
The text was updated successfully, but these errors were encountered: