MediaWiki master
|
Inherits Wikimedia\Telemetry\TracerInterface.
Public Member Functions | |||||||
__construct (Clock $clock, SamplerInterface $sampler, ExporterInterface $exporter, TracerState $tracerState, ContextPropagatorInterface $contextPropagator) | |||||||
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) | |||||||
Create a span with the given name and the currently active span as the implicit parent.This requires a span to be already active and will throw an error otherwise.
| |||||||
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.
| |||||||
Wikimedia\Telemetry\Tracer::__construct | ( | Clock | $clock, |
SamplerInterface | $sampler, | ||
ExporterInterface | $exporter, | ||
TracerState | $tracerState, | ||
ContextPropagatorInterface | $contextPropagator ) |
Definition at line 33 of file Tracer.php.
Wikimedia\Telemetry\Tracer::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 64 of file Tracer.php.
Wikimedia\Telemetry\Tracer::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 74 of file Tracer.php.
Wikimedia\Telemetry\Tracer::createSpan | ( | string | $spanName | ) |
Create a span with the given name and the currently active span as the implicit parent.This requires a span to be already active and will throw an error otherwise.
string | $spanName | The descriptive name of this span. Refer to the OTEL Tracing API spec for recommended naming conventions. |
PreconditionException | If no span was active |
Implements Wikimedia\Telemetry\TracerInterface.
Definition at line 48 of file Tracer.php.
Wikimedia\Telemetry\Tracer::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 69 of file Tracer.php.
Wikimedia\Telemetry\Tracer::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 80 of file Tracer.php.
Wikimedia\Telemetry\Tracer::shutdown | ( | ) |
Shut down this tracer and export collected trace data.
Implements Wikimedia\Telemetry\TracerInterface.
Definition at line 111 of file Tracer.php.