OpenTelemetry PHP

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

$b3  : string
$sampled  : string
$spanId  : string
$traceId  : string

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_TRACE_ID

private mixed B3_TRACE_ID = 'ff0000000000051791e0000000000041'

B3_TRACE_ID_16_CHAR

private mixed B3_TRACE_ID_16_CHAR = 'ff00051791e00041'

Properties

Methods

invalidB3SingleHeaderValueProvider()

public static invalidB3SingleHeaderValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

setUp()

public setUp() : void
Tags
psalm-suppress

PossiblyUndefinedArrayOffset

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>

        
On this page

Search results