MediaWiki master
|
Base interface for an OpenTelemetry tracer responsible for creating spans. More...
Inherited by Wikimedia\Telemetry\NoopTracer, and Wikimedia\Telemetry\Tracer.
Public Member Functions | |
createRootSpan (string $spanName) | |
Create a new root span, i.e. | |
createSpan (string $spanName) | |
Create a span with the given name and the currently active span as the implicit parent. | |
createSpanWithParent (string $spanName, SpanContext $parentSpanContext) | |
Create a span with the given name and parent. | |
shutdown () | |
Shut down this tracer and export collected trace data. | |
Base interface for an OpenTelemetry tracer responsible for creating spans.
Definition at line 10 of file TracerInterface.php.
Wikimedia\Telemetry\TracerInterface::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. |
Implemented in Wikimedia\Telemetry\NoopTracer, and Wikimedia\Telemetry\Tracer.
Wikimedia\Telemetry\TracerInterface::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 |
Implemented in Wikimedia\Telemetry\Tracer.
Wikimedia\Telemetry\TracerInterface::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. |
Implemented in Wikimedia\Telemetry\NoopTracer, and Wikimedia\Telemetry\Tracer.
Wikimedia\Telemetry\TracerInterface::shutdown | ( | ) |
Shut down this tracer and export collected trace data.
Implemented in Wikimedia\Telemetry\NoopTracer, and Wikimedia\Telemetry\Tracer.