MediaWiki master
Wikimedia\Telemetry\StaticInjectionPropagator Class Reference

A ContextPropagatorInterface implementation that injects a fixed set of headers into outgoing requests. More...

Inherits Wikimedia\Telemetry\ContextPropagatorInterface.

Collaboration diagram for Wikimedia\Telemetry\StaticInjectionPropagator:

Public Member Functions

 __construct (array $headers)
 
 extract (array $carrier)
 Attempt to extract a SpanContext from the given carrier.
 
 inject (?SpanContext $spanContext, array $carrier)
 Inject the given SpanContext into the given carrier.SpanContext may be null, in which case the propagator might still inject non-span-specific data.

Returns
array carrier with SpanContext injected

 

Detailed Description

A ContextPropagatorInterface implementation that injects a fixed set of headers into outgoing requests.

It does not perform extraction.

Since
1.44
Access: internal

Definition at line 11 of file StaticInjectionPropagator.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Telemetry\StaticInjectionPropagator::__construct ( array $headers)

Definition at line 14 of file StaticInjectionPropagator.php.

Member Function Documentation

◆ extract()

Wikimedia\Telemetry\StaticInjectionPropagator::extract ( array $carrier)

Attempt to extract a SpanContext from the given carrier.

Implements Wikimedia\Telemetry\ContextPropagatorInterface.

Definition at line 31 of file StaticInjectionPropagator.php.

◆ inject()

Wikimedia\Telemetry\StaticInjectionPropagator::inject ( ?SpanContext $spanContext,
array $carrier )

Inject the given SpanContext into the given carrier.SpanContext may be null, in which case the propagator might still inject non-span-specific data.

Returns
array carrier with SpanContext injected

Implements Wikimedia\Telemetry\ContextPropagatorInterface.

Definition at line 21 of file StaticInjectionPropagator.php.


The documentation for this class was generated from the following file: