diff options
Diffstat (limited to 'vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span')
3 files changed, 508 insertions, 0 deletions
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php new file mode 100644 index 000000000..c6b7a1807 --- /dev/null +++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php @@ -0,0 +1,189 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: opentelemetry/proto/trace/v1/trace.proto + +namespace Opentelemetry\Proto\Trace\V1\Span; + +use Google\Protobuf\Internal\GPBType; +use Google\Protobuf\Internal\RepeatedField; +use Google\Protobuf\Internal\GPBUtil; + +/** + * Event is a time-stamped annotation of the span, consisting of user-supplied + * text description and key-value pairs. + * + * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Span.Event</code> + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * time_unix_nano is the time the event occurred. + * + * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code> + */ + protected $time_unix_nano = 0; + /** + * name of the event. + * This field is semantically required to be set to non-empty string. + * + * Generated from protobuf field <code>string name = 2;</code> + */ + protected $name = ''; + /** + * attributes is a collection of attribute key/value pairs on the event. + * Attribute keys MUST be unique (it is not allowed to have more than one + * attribute with the same key). + * + * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code> + */ + private $attributes; + /** + * dropped_attributes_count is the number of dropped attributes. If the value is 0, + * then no attributes were dropped. + * + * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code> + */ + protected $dropped_attributes_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $time_unix_nano + * time_unix_nano is the time the event occurred. + * @type string $name + * name of the event. + * This field is semantically required to be set to non-empty string. + * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes + * attributes is a collection of attribute key/value pairs on the event. + * Attribute keys MUST be unique (it is not allowed to have more than one + * attribute with the same key). + * @type int $dropped_attributes_count + * dropped_attributes_count is the number of dropped attributes. If the value is 0, + * then no attributes were dropped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * time_unix_nano is the time the event occurred. + * + * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code> + * @return int|string + */ + public function getTimeUnixNano() + { + return $this->time_unix_nano; + } + + /** + * time_unix_nano is the time the event occurred. + * + * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code> + * @param int|string $var + * @return $this + */ + public function setTimeUnixNano($var) + { + GPBUtil::checkUint64($var); + $this->time_unix_nano = $var; + + return $this; + } + + /** + * name of the event. + * This field is semantically required to be set to non-empty string. + * + * Generated from protobuf field <code>string name = 2;</code> + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * name of the event. + * This field is semantically required to be set to non-empty string. + * + * Generated from protobuf field <code>string name = 2;</code> + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * attributes is a collection of attribute key/value pairs on the event. + * Attribute keys MUST be unique (it is not allowed to have more than one + * attribute with the same key). + * + * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code> + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * attributes is a collection of attribute key/value pairs on the event. + * Attribute keys MUST be unique (it is not allowed to have more than one + * attribute with the same key). + * + * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code> + * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class); + $this->attributes = $arr; + + return $this; + } + + /** + * dropped_attributes_count is the number of dropped attributes. If the value is 0, + * then no attributes were dropped. + * + * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code> + * @return int + */ + public function getDroppedAttributesCount() + { + return $this->dropped_attributes_count; + } + + /** + * dropped_attributes_count is the number of dropped attributes. If the value is 0, + * then no attributes were dropped. + * + * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code> + * @param int $var + * @return $this + */ + public function setDroppedAttributesCount($var) + { + GPBUtil::checkUint32($var); + $this->dropped_attributes_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Event::class, \Opentelemetry\Proto\Trace\V1\Span_Event::class); + diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php new file mode 100644 index 000000000..3096739de --- /dev/null +++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php @@ -0,0 +1,225 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: opentelemetry/proto/trace/v1/trace.proto + +namespace Opentelemetry\Proto\Trace\V1\Span; + +use Google\Protobuf\Internal\GPBType; +use Google\Protobuf\Internal\RepeatedField; +use Google\Protobuf\Internal\GPBUtil; + +/** + * A pointer from the current span to another span in the same trace or in a + * different trace. For example, this can be used in batching operations, + * where a single batch handler processes multiple requests from different + * traces or when the handler receives a request from a different project. + * + * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Span.Link</code> + */ +class Link extends \Google\Protobuf\Internal\Message +{ + /** + * A unique identifier of a trace that this linked span is part of. The ID is a + * 16-byte array. + * + * Generated from protobuf field <code>bytes trace_id = 1;</code> + */ + protected $trace_id = ''; + /** + * A unique identifier for the linked span. The ID is an 8-byte array. + * + * Generated from protobuf field <code>bytes span_id = 2;</code> + */ + protected $span_id = ''; + /** + * The trace_state associated with the link. + * + * Generated from protobuf field <code>string trace_state = 3;</code> + */ + protected $trace_state = ''; + /** + * attributes is a collection of attribute key/value pairs on the link. + * Attribute keys MUST be unique (it is not allowed to have more than one + * attribute with the same key). + * + * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;</code> + */ + private $attributes; + /** + * dropped_attributes_count is the number of dropped attributes. If the value is 0, + * then no attributes were dropped. + * + * Generated from protobuf field <code>uint32 dropped_attributes_count = 5;</code> + */ + protected $dropped_attributes_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $trace_id + * A unique identifier of a trace that this linked span is part of. The ID is a + * 16-byte array. + * @type string $span_id + * A unique identifier for the linked span. The ID is an 8-byte array. + * @type string $trace_state + * The trace_state associated with the link. + * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes + * attributes is a collection of attribute key/value pairs on the link. + * Attribute keys MUST be unique (it is not allowed to have more than one + * attribute with the same key). + * @type int $dropped_attributes_count + * dropped_attributes_count is the number of dropped attributes. If the value is 0, + * then no attributes were dropped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * A unique identifier of a trace that this linked span is part of. The ID is a + * 16-byte array. + * + * Generated from protobuf field <code>bytes trace_id = 1;</code> + * @return string + */ + public function getTraceId() + { + return $this->trace_id; + } + + /** + * A unique identifier of a trace that this linked span is part of. The ID is a + * 16-byte array. + * + * Generated from protobuf field <code>bytes trace_id = 1;</code> + * @param string $var + * @return $this + */ + public function setTraceId($var) + { + GPBUtil::checkString($var, False); + $this->trace_id = $var; + + return $this; + } + + /** + * A unique identifier for the linked span. The ID is an 8-byte array. + * + * Generated from protobuf field <code>bytes span_id = 2;</code> + * @return string + */ + public function getSpanId() + { + return $this->span_id; + } + + /** + * A unique identifier for the linked span. The ID is an 8-byte array. + * + * Generated from protobuf field <code>bytes span_id = 2;</code> + * @param string $var + * @return $this + */ + public function setSpanId($var) + { + GPBUtil::checkString($var, False); + $this->span_id = $var; + + return $this; + } + + /** + * The trace_state associated with the link. + * + * Generated from protobuf field <code>string trace_state = 3;</code> + * @return string + */ + public function getTraceState() + { + return $this->trace_state; + } + + /** + * The trace_state associated with the link. + * + * Generated from protobuf field <code>string trace_state = 3;</code> + * @param string $var + * @return $this + */ + public function setTraceState($var) + { + GPBUtil::checkString($var, True); + $this->trace_state = $var; + + return $this; + } + + /** + * attributes is a collection of attribute key/value pairs on the link. + * Attribute keys MUST be unique (it is not allowed to have more than one + * attribute with the same key). + * + * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;</code> + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * attributes is a collection of attribute key/value pairs on the link. + * Attribute keys MUST be unique (it is not allowed to have more than one + * attribute with the same key). + * + * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;</code> + * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class); + $this->attributes = $arr; + + return $this; + } + + /** + * dropped_attributes_count is the number of dropped attributes. If the value is 0, + * then no attributes were dropped. + * + * Generated from protobuf field <code>uint32 dropped_attributes_count = 5;</code> + * @return int + */ + public function getDroppedAttributesCount() + { + return $this->dropped_attributes_count; + } + + /** + * dropped_attributes_count is the number of dropped attributes. If the value is 0, + * then no attributes were dropped. + * + * Generated from protobuf field <code>uint32 dropped_attributes_count = 5;</code> + * @param int $var + * @return $this + */ + public function setDroppedAttributesCount($var) + { + GPBUtil::checkUint32($var); + $this->dropped_attributes_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Link::class, \Opentelemetry\Proto\Trace\V1\Span_Link::class); + diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php new file mode 100644 index 000000000..9ffa93719 --- /dev/null +++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php @@ -0,0 +1,94 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: opentelemetry/proto/trace/v1/trace.proto + +namespace Opentelemetry\Proto\Trace\V1\Span; + +use UnexpectedValueException; + +/** + * 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> + */ +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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpanKind::class, \Opentelemetry\Proto\Trace\V1\Span_SpanKind::class); + |