Skip to content

Sampler: SamplingResult should return TraceState  #556

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions