MediaWiki master
|
A no-op tracer that creates no-op spans and persists no data. More...
Inherits Wikimedia\Telemetry\TracerInterface.
Public Member Functions | |||||||
__construct (?ContextPropagatorInterface $contextPropagator=null) | |||||||
createRootSpan (string $spanName) | |||||||
Create a new root span, i.e.a span with no parent that forms the basis for a new trace.
| |||||||
createRootSpanFromCarrier (string $spanName, array $carrier) | |||||||
Create a span from a carrier (e.g.HTTP headers) that was extracted from a remote call. The configured implementation of ContextPropagatorInterface will be used to extract the span context. If no span context could be extracted, a new root span will be created.
| |||||||
createSpan (string $spanName, $parentSpan=null) | |||||||
createSpanWithParent (string $spanName, SpanContext $parentSpanContext) | |||||||
Create a span with the given name and parent.
| |||||||
getRequestHeaders () | |||||||
Get Headers to be attached to outgoing requests.Caution: Telemetry headers should not be attached to requests bound for external/untrusted services. They are intended and designed to allow correlation of requests from clients, which can be a privacy concern. In the future, telemetry might even contain explicit user identifiers or other sensitive information.
| |||||||
shutdown () | |||||||
Shut down this tracer and export collected trace data.
| |||||||
![]() | |||||||
createSpan (string $spanName) | |||||||
Create a span with the given name and the currently active span as the implicit parent. | |||||||
A no-op tracer that creates no-op spans and persists no data.
Useful for scenarios where tracing is disabled. Can still propagate some (not-Span-specific) context, like X-Request-Id.
Definition at line 12 of file NoopTracer.php.
Wikimedia\Telemetry\NoopTracer::__construct | ( | ?ContextPropagatorInterface | $contextPropagator = null | ) |
Definition at line 18 of file NoopTracer.php.
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.
string | $spanName | The descriptive name of this span. Refer to the OTEL Tracing API spec for recommended naming conventions. |
Implements Wikimedia\Telemetry\TracerInterface.
Definition at line 30 of file NoopTracer.php.
Wikimedia\Telemetry\NoopTracer::createRootSpanFromCarrier | ( | string | $spanName, |
array | $carrier ) |
Create a span from a carrier (e.g.HTTP headers) that was extracted from a remote call. The configured implementation of ContextPropagatorInterface will be used to extract the span context. If no span context could be extracted, a new root span will be created.
string | $spanName | The descriptive name of this span. Refer to the OTEL Tracing API spec for recommended naming conventions. |
array | $carrier | The carrier data extracted from the remote call. |
Implements Wikimedia\Telemetry\TracerInterface.
Definition at line 45 of file NoopTracer.php.
Wikimedia\Telemetry\NoopTracer::createSpan | ( | string | $spanName, |
$parentSpan = null ) |
Definition at line 25 of file NoopTracer.php.
Wikimedia\Telemetry\NoopTracer::createSpanWithParent | ( | string | $spanName, |
SpanContext | $parentSpanContext ) |
Create a span with the given name and parent.
string | $spanName | The descriptive name of this span. Refer to the OTEL Tracing API spec for recommended naming conventions. |
SpanContext | $parentSpanContext | Context of the parent span this span should be associated with. |
Implements Wikimedia\Telemetry\TracerInterface.
Definition at line 35 of file NoopTracer.php.
Wikimedia\Telemetry\NoopTracer::getRequestHeaders | ( | ) |
Get Headers to be attached to outgoing requests.Caution: Telemetry headers should not be attached to requests bound for external/untrusted services. They are intended and designed to allow correlation of requests from clients, which can be a privacy concern. In the future, telemetry might even contain explicit user identifiers or other sensitive information.
Implements Wikimedia\Http\TelemetryHeadersInterface.
Definition at line 50 of file NoopTracer.php.
Wikimedia\Telemetry\NoopTracer::shutdown | ( | ) |
Shut down this tracer and export collected trace data.
Implements Wikimedia\Telemetry\TracerInterface.
Definition at line 40 of file NoopTracer.php.