Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4139379
StaticInjectionPropagator.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
721 B
Referenced Files
None
Subscribers
None
StaticInjectionPropagator.php
View Options
<?php
namespace
Wikimedia\Telemetry
;
/**
* A {@link ContextPropagatorInterface} implementation that injects
* a fixed set of headers into outgoing requests. It does not perform extraction.
*
* @since 1.44
* @internal
*/
class
StaticInjectionPropagator
implements
ContextPropagatorInterface
{
private
array
$headers
;
public
function
__construct
(
array
$headers
)
{
$this
->
headers
=
$headers
;
}
/**
* @inheritDoc
*/
public
function
inject
(
?
SpanContext
$spanContext
,
array
$carrier
):
array
{
foreach
(
$this
->
headers
as
$key
=>
$value
)
{
$carrier
[
$key
]
=
$value
;
}
return
$carrier
;
}
/**
* @inheritDoc
*/
public
function
extract
(
array
$carrier
):
?
SpanContext
{
return
null
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 15:03 (3 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
5e/02/02de023d9a1bf65cbf159b5a9e63
Default Alt Text
StaticInjectionPropagator.php (721 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment