class SpanKind
SpanKind is the type of span. Can be used to specify additional relationships between spans in addition to a parent/child relationship.
Protobuf type <code>opentelemetry.proto.trace.v1.Span.SpanKind</code>
Hierarchy
- class \Opentelemetry\Proto\Trace\V1\Span\SpanKind
Expanded class hierarchy of SpanKind
1 file declares its use of SpanKind
- SpanConverter.php in vendor/
open-telemetry/ exporter-otlp/ SpanConverter.php
File
-
vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Trace/ V1/ Span/ SpanKind.php, line 15
Namespace
Opentelemetry\Proto\Trace\V1\SpanView source
class SpanKind {
/**
* Unspecified. Do NOT use as default.
* Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED.
*
* Generated from protobuf enum <code>SPAN_KIND_UNSPECIFIED = 0;</code>
*/
const SPAN_KIND_UNSPECIFIED = 0;
/**
* Indicates that the span represents an internal operation within an application,
* as opposed to an operation happening at the boundaries. Default value.
*
* Generated from protobuf enum <code>SPAN_KIND_INTERNAL = 1;</code>
*/
const SPAN_KIND_INTERNAL = 1;
/**
* Indicates that the span covers server-side handling of an RPC or other
* remote network request.
*
* Generated from protobuf enum <code>SPAN_KIND_SERVER = 2;</code>
*/
const SPAN_KIND_SERVER = 2;
/**
* Indicates that the span describes a request to some remote service.
*
* Generated from protobuf enum <code>SPAN_KIND_CLIENT = 3;</code>
*/
const SPAN_KIND_CLIENT = 3;
/**
* Indicates that the span describes a producer sending a message to a broker.
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship
* between producer and consumer spans. A PRODUCER span ends when the message was accepted
* by the broker while the logical processing of the message might span a much longer time.
*
* Generated from protobuf enum <code>SPAN_KIND_PRODUCER = 4;</code>
*/
const SPAN_KIND_PRODUCER = 4;
/**
* Indicates that the span describes consumer receiving a message from a broker.
* Like the PRODUCER kind, there is often no direct critical path latency relationship
* between producer and consumer spans.
*
* Generated from protobuf enum <code>SPAN_KIND_CONSUMER = 5;</code>
*/
const SPAN_KIND_CONSUMER = 5;
private static $valueToName = [
self::SPAN_KIND_UNSPECIFIED => 'SPAN_KIND_UNSPECIFIED',
self::SPAN_KIND_INTERNAL => 'SPAN_KIND_INTERNAL',
self::SPAN_KIND_SERVER => 'SPAN_KIND_SERVER',
self::SPAN_KIND_CLIENT => 'SPAN_KIND_CLIENT',
self::SPAN_KIND_PRODUCER => 'SPAN_KIND_PRODUCER',
self::SPAN_KIND_CONSUMER => 'SPAN_KIND_CONSUMER',
];
public static function name($value) {
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf('Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name) {
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf('Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
SpanKind::$valueToName | private static | property | |
SpanKind::name | public static | function | |
SpanKind::SPAN_KIND_CLIENT | constant | Indicates that the span describes a request to some remote service. | |
SpanKind::SPAN_KIND_CONSUMER | constant | Indicates that the span describes consumer receiving a message from a broker. Like the PRODUCER kind, there is often no direct critical path latency relationship between producer and consumer spans. |
|
SpanKind::SPAN_KIND_INTERNAL | constant | Indicates that the span represents an internal operation within an application, as opposed to an operation happening at the boundaries. Default value. |
|
SpanKind::SPAN_KIND_PRODUCER | constant | Indicates that the span describes a producer sending a message to a broker. Unlike CLIENT and SERVER, there is often no direct critical path latency relationship between producer and consumer spans. A PRODUCER span ends when the message was… |
|
SpanKind::SPAN_KIND_SERVER | constant | Indicates that the span covers server-side handling of an RPC or other remote network request. |
|
SpanKind::SPAN_KIND_UNSPECIFIED | constant | Unspecified. Do NOT use as default. Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED. |
|
SpanKind::value | public static | function |