MediaWiki
master
SpanInterface.php
Go to the documentation of this file.
1
<?php
2
namespace
Wikimedia\Telemetry
;
3
14
interface
SpanInterface
{
19
public
const
SPAN_KIND_INTERNAL
= 1;
20
25
public
const
SPAN_KIND_SERVER
= 2;
26
30
public
const
SPAN_KIND_CLIENT
= 3;
31
35
public
const
SPAN_KIND_PRODUCER
= 4;
36
41
public
const
SPAN_KIND_CONSUMER
= 5;
42
51
public
function
setSpanKind
(
int
$spanKind ):
SpanInterface
;
52
57
public
const
SPAN_STATUS_UNSET
= 0;
58
62
public
const
SPAN_STATUS_OK
= 1;
63
68
public
const
SPAN_STATUS_ERROR
= 2;
69
76
public
function
setSpanStatus
(
int
$spanStatus ):
SpanInterface
;
77
92
public
function
setAttributes
( array $attributes ):
SpanInterface
;
93
100
public
function
start
( ?
int
$epochNanos =
null
):
SpanInterface
;
101
111
public
function
end
( ?
int
$epochNanos =
null
): void;
112
129
public
function
activate
():
SpanInterface
;
130
138
public
function
deactivate
():
SpanInterface
;
139
144
public
function
getContext
():
SpanContext
;
145
}
Wikimedia\Telemetry\SpanContext
Data transfer object holding data associated with a given span.
Definition
SpanContext.php:11
Wikimedia\Telemetry\SpanInterface
Represents an OpenTelemetry span, i.e.
Definition
SpanInterface.php:14
Wikimedia\Telemetry\SpanInterface\start
start(?int $epochNanos=null)
Start this span, optionally specifying an override for its start time.
Wikimedia\Telemetry\SpanInterface\setSpanKind
setSpanKind(int $spanKind)
Set the kind of this span, which describes how it relates to its parent and children within the overa...
Wikimedia\Telemetry\SpanInterface\SPAN_KIND_PRODUCER
const SPAN_KIND_PRODUCER
Indicates that the span describes the initiators of an asynchronous request.
Definition
SpanInterface.php:35
Wikimedia\Telemetry\SpanInterface\SPAN_KIND_CLIENT
const SPAN_KIND_CLIENT
Indicates that the span describes a request to some remote service.
Definition
SpanInterface.php:30
Wikimedia\Telemetry\SpanInterface\deactivate
deactivate()
Deactivate this span.
Wikimedia\Telemetry\SpanInterface\getContext
getContext()
Get the context holding data for this span.
Wikimedia\Telemetry\SpanInterface\setSpanStatus
setSpanStatus(int $spanStatus)
Set the status of this span.
Wikimedia\Telemetry\SpanInterface\activate
activate()
Make this span the active span.
Wikimedia\Telemetry\SpanInterface\SPAN_STATUS_ERROR
const SPAN_STATUS_ERROR
Indicates that the operation represented by this span failed.
Definition
SpanInterface.php:68
Wikimedia\Telemetry\SpanInterface\SPAN_KIND_INTERNAL
const SPAN_KIND_INTERNAL
Default value.
Definition
SpanInterface.php:19
Wikimedia\Telemetry\SpanInterface\SPAN_KIND_CONSUMER
const SPAN_KIND_CONSUMER
Indicates that the span describes a child of an asynchronous SpanInterface::SPAN_KIND_PRODUCER reques...
Definition
SpanInterface.php:41
Wikimedia\Telemetry\SpanInterface\SPAN_KIND_SERVER
const SPAN_KIND_SERVER
Indicates that the span covers server-side handling of a synchronous RPC or other incoming request fr...
Definition
SpanInterface.php:25
Wikimedia\Telemetry\SpanInterface\SPAN_STATUS_UNSET
const SPAN_STATUS_UNSET
Default value.
Definition
SpanInterface.php:57
Wikimedia\Telemetry\SpanInterface\SPAN_STATUS_OK
const SPAN_STATUS_OK
Indicates that the operation represented by this span was successful.
Definition
SpanInterface.php:62
Wikimedia\Telemetry\SpanInterface\setAttributes
setAttributes(array $attributes)
Set attributes (arbitrary metadata) for this span.
Wikimedia\Telemetry\SpanInterface\end
end(?int $epochNanos=null)
End this span, optionally specifying an override for its end time.
Wikimedia\Telemetry
Definition
Clock.php:2
includes
libs
telemetry
SpanInterface.php
Generated on Sun Mar 16 2025 22:25:01 for MediaWiki by
1.10.0