B3SinglePropagator
in package
implements
TextMapPropagatorInterface
FinalYes
B3 is a propagator that supports the specification for the B3 single header "b3" used for trace context propagation across service boundaries.
(https://github.com/openzipkin/b3-propagation#single-header)
Table of Contents
Interfaces
Constants
- B3 = 'b3'
- FIELDS = [self::B3]
- IS_DEBUG = 'd'
- IS_NOT_SAMPLED = '0'
- IS_SAMPLED = '1'
- VALID_NON_SAMPLED = [self::IS_NOT_SAMPLED, 'false']
- VALID_SAMPLED = [self::IS_SAMPLED, 'true']
Properties
- $instance : self|null
Methods
- extract() : ContextInterface
- Extracts specific values from the provided carrier into the provided {@see ContextInterface} via an {@see PropagationGetterInterface}.
- fields() : array<int, string>
- Returns list of fields that will be used by this propagator.
- getInstance() : self
- inject() : void
- Injects specific values from the provided {@see ContextInterface} into the provided carrier via an {@see PropagationSetterInterface}.
- extractImpl() : SpanContextInterface
- processSampledValue() : int|null
Constants
B3
private
mixed
B3
= 'b3'
FIELDS
private
mixed
FIELDS
= [self::B3]
IS_DEBUG
private
mixed
IS_DEBUG
= 'd'
IS_NOT_SAMPLED
private
mixed
IS_NOT_SAMPLED
= '0'
IS_SAMPLED
private
mixed
IS_SAMPLED
= '1'
VALID_NON_SAMPLED
private
mixed
VALID_NON_SAMPLED
= [self::IS_NOT_SAMPLED, 'false']
VALID_SAMPLED
private
mixed
VALID_SAMPLED
= [self::IS_SAMPLED, 'true']
Properties
$instance
private
static self|null
$instance
= null
Methods
extract()
Extracts specific values from the provided carrier into the provided {@see ContextInterface} via an {@see PropagationGetterInterface}.
public
extract(mixed $carrier[, PropagationGetterInterface|null $getter = null ][, ContextInterface|null $context = null ]) : ContextInterface
Parameters
- $carrier : mixed
- $getter : PropagationGetterInterface|null = null
- $context : ContextInterface|null = null
Return values
ContextInterfacefields()
Returns list of fields that will be used by this propagator.
public
fields() : array<int, string>
Return values
array<int, string>getInstance()
public
static getInstance() : self
Return values
selfinject()
Injects specific values from the provided {@see ContextInterface} into the provided carrier via an {@see PropagationSetterInterface}.
public
inject(mixed &$carrier[, PropagationSetterInterface|null $setter = null ][, ContextInterface|null $context = null ]) : void
Parameters
- $carrier : mixed
- $setter : PropagationSetterInterface|null = null
- $context : ContextInterface|null = null
extractImpl()
private
static extractImpl(mixed $carrier, PropagationGetterInterface $getter, ContextInterface &$context) : SpanContextInterface
Parameters
- $carrier : mixed
- $getter : PropagationGetterInterface
- $context : ContextInterface
Return values
SpanContextInterfaceprocessSampledValue()
private
static processSampledValue(mixed $value) : int|null
Parameters
- $value : mixed