MediaWiki master
TracerInterface.php
Go to the documentation of this file.
1<?php
2namespace Wikimedia\Telemetry;
3
4use Wikimedia\Assert\PreconditionException;
5
10interface TracerInterface {
21 public function createSpan( string $spanName ): SpanInterface;
22
31 public function createRootSpan( string $spanName ): SpanInterface;
32
42 public function createSpanWithParent( string $spanName, SpanContext $parentSpanContext ): SpanInterface;
43
48 public function shutdown(): void;
49}
Data transfer object holding data associated with a given span.
Represents an OpenTelemetry span, i.e.
Base interface for an OpenTelemetry tracer responsible for creating spans.
createRootSpan(string $spanName)
Create a new root span, i.e.
createSpanWithParent(string $spanName, SpanContext $parentSpanContext)
Create a span with the given name and parent.
createSpan(string $spanName)
Create a span with the given name and the currently active span as the implicit parent.
shutdown()
Shut down this tracer and export collected trace data.