class StatusCode
For the semantics of status codes see https://github.com/open-telemetry/opentelemetry-specification/blob/main…
Protobuf type <code>opentelemetry.proto.trace.v1.Status.StatusCode</code>
Hierarchy
- class \Opentelemetry\Proto\Trace\V1\Status\StatusCode
Expanded class hierarchy of StatusCode
1 file declares its use of StatusCode
- SpanConverter.php in vendor/
open-telemetry/ exporter-otlp/ SpanConverter.php
1 string reference to 'StatusCode'
- Profile::__sleep in vendor/
symfony/ http-kernel/ Profiler/ Profile.php
File
-
vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Trace/ V1/ Status/ StatusCode.php, line 15
Namespace
Opentelemetry\Proto\Trace\V1\StatusView source
class StatusCode {
/**
* The default status.
*
* Generated from protobuf enum <code>STATUS_CODE_UNSET = 0;</code>
*/
const STATUS_CODE_UNSET = 0;
/**
* The Span has been validated by an Application developer or Operator to
* have completed successfully.
*
* Generated from protobuf enum <code>STATUS_CODE_OK = 1;</code>
*/
const STATUS_CODE_OK = 1;
/**
* The Span contains an error.
*
* Generated from protobuf enum <code>STATUS_CODE_ERROR = 2;</code>
*/
const STATUS_CODE_ERROR = 2;
private static $valueToName = [
self::STATUS_CODE_UNSET => 'STATUS_CODE_UNSET',
self::STATUS_CODE_OK => 'STATUS_CODE_OK',
self::STATUS_CODE_ERROR => 'STATUS_CODE_ERROR',
];
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 |
---|---|---|---|
StatusCode::$valueToName | private static | property | |
StatusCode::name | public static | function | |
StatusCode::STATUS_CODE_ERROR | constant | The Span contains an error. | |
StatusCode::STATUS_CODE_OK | constant | The Span has been validated by an Application developer or Operator to have completed successfully. |
|
StatusCode::STATUS_CODE_UNSET | constant | The default status. | |
StatusCode::value | public static | function |