B3SinglePropagatorTest
extends TestCase
in package
Attributes
- #[CoversClass]
- \OpenTelemetry\Extension\Propagator\B3\B3SinglePropagator::class
Table of Contents
Constants
- B3_DENY_SAMPLING = '0'
- B3_HEADER_DEBUG = self::TRACE_ID_BASE16 . '-' . self::SPAN_ID_BASE16 . '-' . self::DEBUG_FLAG
- B3_HEADER_NOT_SAMPLED = self::TRACE_ID_BASE16 . '-' . self::SPAN_ID_BASE16 . '-0'
- B3_HEADER_SAMPLED = self::TRACE_ID_BASE16 . '-' . self::SPAN_ID_BASE16 . '-1'
- DEBUG_FLAG = 'd'
- SPAN_ID_BASE16 = 'ff00000000000041'
- TRACE_ID_BASE16 = 'ff000000000000000000000000000041'
Properties
- $B3 : string
- $b3SinglePropagator : B3SinglePropagator
Methods
- debugValueProvider() : array<string|int, mixed>
- invalidSampledValueProvider() : array<string|int, mixed>
- test_empty_span_id() : void
- test_empty_trace_id() : void
- test_extract_and_inject() : void
- test_extract_debug_context() : void
- test_extract_defer_sampling() : void
- test_extract_deny_sampling() : void
- test_extract_empty_header() : void
- test_extract_header_with_extra_flags() : void
- test_extract_invalid_sampled_context() : void
- test_extract_non_sampled_context() : void
- test_extract_non_sampled_context_with_parent_span_id() : void
- test_extract_nothing() : void
- test_extract_sampled_context() : void
- test_extract_sampled_context_with_parent_span_id() : void
- test_fields() : void
- test_inject_debug_context() : void
- test_inject_empty() : void
- test_inject_invalid_context() : void
- test_inject_non_sampled_context() : void
- test_inject_sampled_context() : void
- test_invalid_span_id() : void
- test_invalid_span_id_size() : void
- test_invalid_trace_id() : void
- test_invalid_trace_id_size() : void
- setUp() : void
- assertInvalid() : void
- getSpanContext() : SpanContextInterface
- withSpanContext() : ContextInterface
Constants
B3_DENY_SAMPLING
private
mixed
B3_DENY_SAMPLING
= '0'
B3_HEADER_DEBUG
private
mixed
B3_HEADER_DEBUG
= self::TRACE_ID_BASE16 . '-' . self::SPAN_ID_BASE16 . '-' . self::DEBUG_FLAG
B3_HEADER_NOT_SAMPLED
private
mixed
B3_HEADER_NOT_SAMPLED
= self::TRACE_ID_BASE16 . '-' . self::SPAN_ID_BASE16 . '-0'
B3_HEADER_SAMPLED
private
mixed
B3_HEADER_SAMPLED
= self::TRACE_ID_BASE16 . '-' . self::SPAN_ID_BASE16 . '-1'
DEBUG_FLAG
private
mixed
DEBUG_FLAG
= 'd'
SPAN_ID_BASE16
private
mixed
SPAN_ID_BASE16
= 'ff00000000000041'
TRACE_ID_BASE16
private
mixed
TRACE_ID_BASE16
= 'ff000000000000000000000000000041'
Properties
$B3
private
string
$B3
$b3SinglePropagator
private
B3SinglePropagator
$b3SinglePropagator
Methods
debugValueProvider()
public
static debugValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>invalidSampledValueProvider()
public
static invalidSampledValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>test_empty_span_id()
public
test_empty_span_id() : void
test_empty_trace_id()
public
test_empty_trace_id() : void
test_extract_and_inject()
public
test_extract_and_inject() : void
test_extract_debug_context()
public
test_extract_debug_context(mixed $headerValue) : void
Parameters
- $headerValue : mixed
Attributes
- #[DataProvider]
- 'debugValueProvider'
test_extract_defer_sampling()
public
test_extract_defer_sampling() : void
test_extract_deny_sampling()
public
test_extract_deny_sampling() : void
test_extract_empty_header()
public
test_extract_empty_header() : void
test_extract_header_with_extra_flags()
public
test_extract_header_with_extra_flags() : void
test_extract_invalid_sampled_context()
public
test_extract_invalid_sampled_context(mixed $headerValue) : void
Parameters
- $headerValue : mixed
Attributes
- #[DataProvider]
- 'invalidSampledValueProvider'
test_extract_non_sampled_context()
public
test_extract_non_sampled_context() : void
test_extract_non_sampled_context_with_parent_span_id()
public
test_extract_non_sampled_context_with_parent_span_id() : void
test_extract_nothing()
public
test_extract_nothing() : void
test_extract_sampled_context()
public
test_extract_sampled_context() : void
test_extract_sampled_context_with_parent_span_id()
public
test_extract_sampled_context_with_parent_span_id() : void
test_fields()
public
test_fields() : void
test_inject_debug_context()
public
test_inject_debug_context() : void
test_inject_empty()
public
test_inject_empty() : void
test_inject_invalid_context()
public
test_inject_invalid_context() : void
test_inject_non_sampled_context()
public
test_inject_non_sampled_context() : void
test_inject_sampled_context()
public
test_inject_sampled_context() : void
test_invalid_span_id()
public
test_invalid_span_id() : void
test_invalid_span_id_size()
public
test_invalid_span_id_size() : void
test_invalid_trace_id()
public
test_invalid_trace_id() : void
test_invalid_trace_id_size()
public
test_invalid_trace_id_size() : void
setUp()
protected
setUp() : void
Tags
assertInvalid()
private
assertInvalid(array<string|int, mixed> $carrier) : void
Parameters
- $carrier : array<string|int, mixed>
getSpanContext()
private
getSpanContext(ContextInterface $context) : SpanContextInterface
Parameters
- $context : ContextInterface
Return values
SpanContextInterfacewithSpanContext()
private
withSpanContext(SpanContextInterface $spanContext, ContextInterface $context) : ContextInterface
Parameters
- $spanContext : SpanContextInterface
- $context : ContextInterface