Is there a way to let trace exporter to export all the spans to OTel agent/collector regardless of the sampled flag in the spans' are 0/1 and let OTel agent/collector to make the decision based on the spans' sampled flag?
Is your feature request related to a problem? Please describe. Is there a way to let trace exporter to export all the spans to OTel agent/collector regardless of the sampled flag in the spans' are 0/1 and let OTel agent/collector to make the decision based on the spans' Sampled flag?
Describe the solution you'd like The SDK allows all spans to be exported to OTel Agent/Collector with its Sampled flag, so that The OTel agent/collector can receive 100% of the spans created by the app. This opens the opportunity for OTel Agent/Collector's processors opportunity to gather information from all spans and it can decided to store the spans to backend store based the spans' sampled flag.
Describe alternatives you've considered
Additional context In SdkSpanBuilder.startSpan() PropagatedSpan is created when Span is not sampled, resulting in the span not being exported.
Also, OTel's trace.proto don't have fields to pass the sample flag to OTel agent/collector.
This would need to be added to the specification if we were to implement it in Java. Please raise this as an issue in the specification repository. Thanks!
@jkwatson FYI, https://github.com/open-telemetry/opentelemetry-specification/issues/2986
Related to #4467.