OpenTelemetry PHP

TraceContextPropagator
in package
implements TextMapPropagatorInterface

FinalYes

TraceContext is a propagator that supports the W3C Trace Context format (https://www.w3.org/TR/trace-context/)

This propagator will propagate the traceparent and tracestate headers to guarantee traces are not broken. It is up to the users of this propagator to choose if they want to participate in a trace by modifying the traceparent header and relevant parts of the tracestate header containing their proprietary information.

Table of Contents

Interfaces

TextMapPropagatorInterface

Constants

FIELDS  = [self::TRACEPARENT, self::TRACESTATE]
TRACEPARENT  = 'traceparent'
TRACESTATE  = 'tracestate'
VERSION  = '00'

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

Constants

Properties

Methods

fields()

Returns list of fields that will be used by this propagator.

public fields() : array<int, string>
Return values
array<int, string>

        
On this page

Search results