SamplingResult
in package
FinalYes
Table of Contents
Constants
- DROP = 0
- Span will not be recorded and all events and attributes will be dropped.
- RECORD_AND_SAMPLE = 2
- Span will be recorder and exported.
- RECORD_ONLY = 1
- Span will be recorded but SpanExporters will not receive this Span.
Properties
- $attributes : iterable<string|int, mixed>
- $decision : int
- $traceState : TraceStateInterface|null
Methods
- __construct() : mixed
- getAttributes() : iterable<string|int, mixed>
- Return attributes which will be attached to the span.
- getDecision() : int
- Return sampling decision whether span should be recorded or not.
- getTraceState() : TraceStateInterface|null
- Return a collection of links that will be associated with the Span to be created.
Constants
DROP
Span will not be recorded and all events and attributes will be dropped.
public
mixed
DROP
= 0
RECORD_AND_SAMPLE
Span will be recorder and exported.
public
mixed
RECORD_AND_SAMPLE
= 2
RECORD_ONLY
Span will be recorded but SpanExporters will not receive this Span.
public
mixed
RECORD_ONLY
= 1
Properties
$attributes read-only
private
iterable<string|int, mixed>
$attributes
= []
$decision read-only
private
int
$decision
$traceState read-only
private
TraceStateInterface|null
$traceState
= null
Methods
__construct()
public
__construct(int $decision[, iterable<string|int, mixed> $attributes = [] ][, TraceStateInterface|null $traceState = null ]) : mixed
Parameters
- $decision : int
- $attributes : iterable<string|int, mixed> = []
- $traceState : TraceStateInterface|null = null
-
A Tracestate that will be associated with the Span through the new SpanContext.
getAttributes()
Return attributes which will be attached to the span.
public
getAttributes() : iterable<string|int, mixed>
Return values
iterable<string|int, mixed>getDecision()
Return sampling decision whether span should be recorded or not.
public
getDecision() : int
Return values
intgetTraceState()
Return a collection of links that will be associated with the Span to be created.
public
getTraceState() : TraceStateInterface|null