Skip to content

Sampler: SamplingResult should return TraceState  #556

@lalitb

Description

@lalitb

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;
};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions