function Event::setAttributes
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>
Parameters
\Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var:
Return value
$this
File
-
vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Trace/ V1/ Span/ Event.php, line 149
Class
- Event
- Event is a time-stamped annotation of the span, consisting of user-supplied text description and key-value pairs.
Namespace
Opentelemetry\Proto\Trace\V1\SpanCode
public function setAttributes($var) {
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
$this->attributes = $arr;
return $this;
}