Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4118093
NoopTracer.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
940 B
Referenced Files
None
Subscribers
None
NoopTracer.php
View Options
<?php
namespace
Wikimedia\Telemetry
;
/**
* A no-op tracer that creates no-op spans and persists no data.
* Useful for scenarios where tracing is disabled.
*
* @since 1.43
* @internal
*/
class
NoopTracer
implements
TracerInterface
{
private
SpanContext
$noopSpanContext
;
public
function
__construct
()
{
$this
->
noopSpanContext
=
new
SpanContext
(
''
,
''
,
null
,
''
,
false
);
}
/** @inheritDoc */
public
function
createSpan
(
string
$spanName
,
$parentSpan
=
null
):
SpanInterface
{
return
new
NoopSpan
(
$this
->
noopSpanContext
);
}
/** @inheritDoc */
public
function
createRootSpan
(
string
$spanName
):
SpanInterface
{
return
new
NoopSpan
(
$this
->
noopSpanContext
);
}
/** @inheritDoc */
public
function
createSpanWithParent
(
string
$spanName
,
SpanContext
$parentSpanContext
):
SpanInterface
{
return
new
NoopSpan
(
$this
->
noopSpanContext
);
}
/** @inheritDoc */
public
function
shutdown
():
void
{
// no-op
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 02:34 (2 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ed/0d/32a1a20ac6053db412ffcf56b8cd
Default Alt Text
NoopTracer.php (940 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment