B3PropagatorTest
extends TestCase
in package
Attributes
- #[CoversClass]
- \OpenTelemetry\Extension\Propagator\B3\B3Propagator::class
Table of Contents
Constants
- B3_SINGLE_HEADER_SAMPLED = self::B3_TRACE_ID . '-' . self::B3_SPAN_ID . '-1'
- B3_SPAN_ID = 'ff00051791e00041'
- B3_TRACE_ID = 'ff0000000000051791e0000000000041'
- B3_TRACE_ID_16_CHAR = 'ff00051791e00041'
- IS_NOT_SAMPLED = '0'
- IS_SAMPLED = '1'
Properties
Methods
- invalidB3SingleHeaderValueProvider() : array<string|int, mixed>
- setUp() : void
- test_b3multi_fields() : void
- test_b3multi_inject() : void
- test_b3single_fields() : void
- test_b3single_inject() : void
- test_extract_b3_single() : void
- test_extract_b3_single_invalid_and_b3_multi_valid_context_with_b3multi_instance() : void
- test_extract_b3_single_invalid_and_b3_multi_valid_context_with_b3single_instance() : void
- test_extract_both_sampled_context_with_b3multi_instance() : void
- test_extract_both_sampled_context_with_b3single_instance() : void
- test_extract_only_b3multi_sampled_context_with_b3multi_instance() : void
- test_extract_only_b3multi_sampled_context_with_b3single_instance() : void
- test_extract_only_b3single_sampled_context_with_b3multi_instance() : void
- test_extract_only_b3single_sampled_context_with_b3single_instance() : void
- validTraceIdProvider() : array<string|int, mixed>
- getSpanContext() : SpanContextInterface
- withSpanContext() : ContextInterface
Constants
B3_SINGLE_HEADER_SAMPLED
private
mixed
B3_SINGLE_HEADER_SAMPLED
= self::B3_TRACE_ID . '-' . self::B3_SPAN_ID . '-1'
B3_SPAN_ID
private
mixed
B3_SPAN_ID
= 'ff00051791e00041'
B3_TRACE_ID
private
mixed
B3_TRACE_ID
= 'ff0000000000051791e0000000000041'
B3_TRACE_ID_16_CHAR
private
mixed
B3_TRACE_ID_16_CHAR
= 'ff00051791e00041'
IS_NOT_SAMPLED
private
mixed
IS_NOT_SAMPLED
= '0'
IS_SAMPLED
private
mixed
IS_SAMPLED
= '1'
Properties
$b3
private
string
$b3
$sampled
private
string
$sampled
$spanId
private
string
$spanId
$traceId
private
string
$traceId
Methods
invalidB3SingleHeaderValueProvider()
public
static invalidB3SingleHeaderValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>setUp()
public
setUp() : void
Tags
test_b3multi_fields()
public
test_b3multi_fields() : void
test_b3multi_inject()
public
test_b3multi_inject() : void
test_b3single_fields()
public
test_b3single_fields() : void
test_b3single_inject()
public
test_b3single_inject() : void
test_extract_b3_single()
public
test_extract_b3_single(string $traceId, string $expected) : void
Parameters
- $traceId : string
- $expected : string
Attributes
- #[DataProvider]
- 'validTraceIdProvider'
test_extract_b3_single_invalid_and_b3_multi_valid_context_with_b3multi_instance()
public
test_extract_b3_single_invalid_and_b3_multi_valid_context_with_b3multi_instance(mixed $headerValue) : void
Parameters
- $headerValue : mixed
Attributes
- #[DataProvider]
- 'invalidB3SingleHeaderValueProvider'
test_extract_b3_single_invalid_and_b3_multi_valid_context_with_b3single_instance()
public
test_extract_b3_single_invalid_and_b3_multi_valid_context_with_b3single_instance(mixed $headerValue) : void
Parameters
- $headerValue : mixed
Attributes
- #[DataProvider]
- 'invalidB3SingleHeaderValueProvider'
test_extract_both_sampled_context_with_b3multi_instance()
public
test_extract_both_sampled_context_with_b3multi_instance() : void
test_extract_both_sampled_context_with_b3single_instance()
public
test_extract_both_sampled_context_with_b3single_instance() : void
test_extract_only_b3multi_sampled_context_with_b3multi_instance()
public
test_extract_only_b3multi_sampled_context_with_b3multi_instance(string $traceId, string $expected) : void
Parameters
- $traceId : string
- $expected : string
Attributes
- #[DataProvider]
- 'validTraceIdProvider'
test_extract_only_b3multi_sampled_context_with_b3single_instance()
public
test_extract_only_b3multi_sampled_context_with_b3single_instance() : void
test_extract_only_b3single_sampled_context_with_b3multi_instance()
public
test_extract_only_b3single_sampled_context_with_b3multi_instance() : void
test_extract_only_b3single_sampled_context_with_b3single_instance()
public
test_extract_only_b3single_sampled_context_with_b3single_instance() : void
validTraceIdProvider()
public
static validTraceIdProvider() : array<string|int, mixed>
Return values
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