TraceContextPropagatorTest
extends TestCase
in package
Attributes
- #[CoversClass]
- \OpenTelemetry\API\Trace\Propagation\TraceContextPropagator::class
Table of Contents
Constants
- SPAN_ID_BASE16 = 'ff00000000000041'
- TRACE_ID_BASE16 = 'ff000000000000000000000000000041'
- TRACEPARENT_HEADER_NOT_SAMPLED = '00-' . self::TRACE_ID_BASE16 . '-' . self::SPAN_ID_BASE16 . '-00'
- TRACEPARENT_HEADER_SAMPLED = '00-' . self::TRACE_ID_BASE16 . '-' . self::SPAN_ID_BASE16 . '-01'
- TRACESTATE_NOT_DEFAULT_ENCODING = 'bar=baz,foo=bar'
- TRACESTATE_NOT_DEFAULT_ENCODING_WITH_SPACES = 'bar=baz , foo=bar'
Properties
Methods
- test_empty_span_id() : void
- test_empty_trace_id() : void
- test_extract_and_inject() : void
- test_extract_empty_header() : void
- test_extract_empty_trace_state() : void
- test_extract_future_version() : void
- test_extract_non_sampled_context() : void
- test_extract_non_sampled_context_with_trace_state() : void
- test_extract_nothing() : void
- test_extract_sampled_context() : void
- test_extract_sampled_context_with_trace_state() : void
- test_extract_trace_state_with_spaces() : void
- test_fields() : void
- test_inject_empty() : void
- test_inject_invalid_context() : void
- test_inject_non_sampled_context() : void
- test_inject_non_sampled_context_with_trace_state() : void
- test_inject_sampled_context() : void
- test_inject_sampled_context_with_trace_state() : void
- test_invalid_span_id() : void
- test_invalid_span_id_size() : void
- test_invalid_trace_format() : void
- test_invalid_trace_id() : void
- test_invalid_trace_id_size() : void
- test_invalid_traceparent_version() : void
- test_invalid_traceparent_version_0xff() : void
- setUp() : void
- assertInvalid() : void
- getSpanContext() : SpanContextInterface
- withSpanContext() : ContextInterface
Constants
SPAN_ID_BASE16
private
mixed
SPAN_ID_BASE16
= 'ff00000000000041'
TRACE_ID_BASE16
private
mixed
TRACE_ID_BASE16
= 'ff000000000000000000000000000041'
TRACEPARENT_HEADER_NOT_SAMPLED
private
mixed
TRACEPARENT_HEADER_NOT_SAMPLED
= '00-' . self::TRACE_ID_BASE16 . '-' . self::SPAN_ID_BASE16 . '-00'
TRACEPARENT_HEADER_SAMPLED
private
mixed
TRACEPARENT_HEADER_SAMPLED
= '00-' . self::TRACE_ID_BASE16 . '-' . self::SPAN_ID_BASE16 . '-01'
TRACESTATE_NOT_DEFAULT_ENCODING
private
mixed
TRACESTATE_NOT_DEFAULT_ENCODING
= 'bar=baz,foo=bar'
TRACESTATE_NOT_DEFAULT_ENCODING_WITH_SPACES
private
mixed
TRACESTATE_NOT_DEFAULT_ENCODING_WITH_SPACES
= 'bar=baz , foo=bar'
Properties
$traceContextPropagator
private
TraceContextPropagator
$traceContextPropagator
$traceState
private
TraceStateInterface
$traceState
Methods
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_empty_header()
public
test_extract_empty_header() : void
test_extract_empty_trace_state()
public
test_extract_empty_trace_state() : void
test_extract_future_version()
public
test_extract_future_version() : void
test_extract_non_sampled_context()
public
test_extract_non_sampled_context() : void
test_extract_non_sampled_context_with_trace_state()
public
test_extract_non_sampled_context_with_trace_state() : void
test_extract_nothing()
public
test_extract_nothing() : void
test_extract_sampled_context()
public
test_extract_sampled_context() : void
test_extract_sampled_context_with_trace_state()
public
test_extract_sampled_context_with_trace_state() : void
test_extract_trace_state_with_spaces()
public
test_extract_trace_state_with_spaces() : void
test_fields()
public
test_fields() : 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_non_sampled_context_with_trace_state()
public
test_inject_non_sampled_context_with_trace_state() : void
test_inject_sampled_context()
public
test_inject_sampled_context() : void
test_inject_sampled_context_with_trace_state()
public
test_inject_sampled_context_with_trace_state() : 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_format()
public
test_invalid_trace_format() : void
test_invalid_trace_id()
public
test_invalid_trace_id() : void
test_invalid_trace_id_size()
public
test_invalid_trace_id_size() : void
test_invalid_traceparent_version()
public
test_invalid_traceparent_version() : void
test_invalid_traceparent_version_0xff()
public
test_invalid_traceparent_version_0xff() : void
setUp()
protected
setUp() : void
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