As per the specs (https://github.com/open-telemetry/opentelemetry-specification/blob/ae31114e2d441f1ecd249ce11bb924a6ac54b5d6/specification/trace/sdk.md#sampler):
SamplingResult should contain :
- A sampling Decision.
- A set of span Attributes that will also be added to the Span
- A Tracestate that will be associated with the Span through the new SpanContext.
This needs to be changed in current implementation:
https://github.com/open-telemetry/opentelemetry-cpp/blob/main/sdk/include/opentelemetry/sdk/trace/sampler.h#L39:L44
struct SamplingResult
{
Decision decision;
// A set of span Attributes that will also be added to the Span. Can be nullptr.
std::unique_ptr<const std::map<std::string, opentelemetry::common::AttributeValue>> attributes;
};
As per the specs (https://github.com/open-telemetry/opentelemetry-specification/blob/ae31114e2d441f1ecd249ce11bb924a6ac54b5d6/specification/trace/sdk.md#sampler):
SamplingResultshould contain :This needs to be changed in current implementation:
https://github.com/open-telemetry/opentelemetry-cpp/blob/main/sdk/include/opentelemetry/sdk/trace/sampler.h#L39:L44