Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1429662
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
Sat, May 16, 17:52 (9 h, 18 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cf/85/a13095772b5aafb681c705d8ba63
Default Alt Text
StaticInjectionPropagator.php (721 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment