Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 900 Bytes

File metadata and controls

23 lines (17 loc) · 900 Bytes

pkg/sampling

Overview

This package contains utilities for parsing and interpreting the W3C TraceState and all sampling-relevant fields specified by OpenTelemetry that may be found in the OpenTelemetry section of the W3C TraceState.

This package implements the draft specification in OTEP 235, which specifies two fields used by the OpenTelemetry consistent probability sampling scheme.

These are:

  • th: the Threshold used to determine whether a TraceID is sampled
  • rv: an explicit randomness value, which overrides randomness in the TraceID

OTEP 235 contains details on how to interpret these fields. The are not meant to be human readable, with a few exceptions. The tracestate entry ot=th:0 indicates 100% sampling.