MediaWiki master
Wikimedia\Telemetry\NoopTracer Class Reference

A no-op tracer that creates no-op spans and persists no data. More...

Inherits Wikimedia\Telemetry\TracerInterface.

Collaboration diagram for Wikimedia\Telemetry\NoopTracer:

Public Member Functions

 __construct ()
 
 createRootSpan (string $spanName)
 Create a new root span, i.e.a span with no parent that forms the basis for a new trace.
Parameters
string$spanNameThe descriptive name of this span. Refer to the OTEL Tracing API spec for recommended naming conventions.
Returns
SpanInterface

 
 createSpan (string $spanName, $parentSpan=null)
 
 createSpanWithParent (string $spanName, SpanContext $parentSpanContext)
 Create a span with the given name and parent.
Parameters
string$spanNameThe descriptive name of this span. Refer to the OTEL Tracing API spec for recommended naming conventions.
SpanContext$parentSpanContextContext of the parent span this span should be associated with.
Returns
SpanInterface

 
 shutdown ()
 Shut down this tracer and export collected trace data.
Returns
void

 
- Public Member Functions inherited from Wikimedia\Telemetry\TracerInterface
 createSpan (string $spanName)
 Create a span with the given name and the currently active span as the implicit parent.
 

Detailed Description

A no-op tracer that creates no-op spans and persists no data.

Useful for scenarios where tracing is disabled.

Since
1.43
Access: internal

Definition at line 11 of file NoopTracer.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Telemetry\NoopTracer::__construct ( )

Definition at line 15 of file NoopTracer.php.

Member Function Documentation

◆ createRootSpan()

Wikimedia\Telemetry\NoopTracer::createRootSpan ( string $spanName)

Create a new root span, i.e.a span with no parent that forms the basis for a new trace.

Parameters
string$spanNameThe descriptive name of this span. Refer to the OTEL Tracing API spec for recommended naming conventions.
Returns
SpanInterface

Implements Wikimedia\Telemetry\TracerInterface.

Definition at line 25 of file NoopTracer.php.

◆ createSpan()

Wikimedia\Telemetry\NoopTracer::createSpan ( string $spanName,
$parentSpan = null )

Definition at line 20 of file NoopTracer.php.

◆ createSpanWithParent()

Wikimedia\Telemetry\NoopTracer::createSpanWithParent ( string $spanName,
SpanContext $parentSpanContext )

Create a span with the given name and parent.

Parameters
string$spanNameThe descriptive name of this span. Refer to the OTEL Tracing API spec for recommended naming conventions.
SpanContext$parentSpanContextContext of the parent span this span should be associated with.
Returns
SpanInterface

Implements Wikimedia\Telemetry\TracerInterface.

Definition at line 30 of file NoopTracer.php.

◆ shutdown()

Wikimedia\Telemetry\NoopTracer::shutdown ( )

Shut down this tracer and export collected trace data.

Returns
void

Implements Wikimedia\Telemetry\TracerInterface.

Definition at line 35 of file NoopTracer.php.


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