opentelemetry.proto.trace.v1.Span.Link
*/
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 bytes trace_id = 1;
*/
protected $trace_id = '';
/**
* A unique identifier for the linked span. The ID is an 8-byte array.
*
* Generated from protobuf field bytes span_id = 2;
*/
protected $span_id = '';
/**
* The trace_state associated with the link.
*
* Generated from protobuf field string trace_state = 3;
*/
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 repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;
*/
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 uint32 dropped_attributes_count = 5;
*/
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 bytes trace_id = 1;
* @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 bytes trace_id = 1;
* @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 bytes span_id = 2;
* @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 bytes span_id = 2;
* @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 string trace_state = 3;
* @return string
*/
public function getTraceState()
{
return $this->trace_state;
}
/**
* The trace_state associated with the link.
*
* Generated from protobuf field string trace_state = 3;
* @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 repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;
* @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 repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;
* @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 uint32 dropped_attributes_count = 5;
* @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 uint32 dropped_attributes_count = 5;
* @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);