function KeyValueList::setValues
A collection of key/value pairs of key-value pairs. The list may be empty (may contain 0 elements). The keys MUST be unique (it is not allowed to have more than one value with the same key).
Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue values = 1;</code>
Parameters
\Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var:
Return value
$this
File
-
vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Common/ V1/ KeyValueList.php, line 74
Class
- KeyValueList
- KeyValueList is a list of KeyValue messages. We need KeyValueList as a message since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly…
Namespace
Opentelemetry\Proto\Common\V1Code
public function setValues($var) {
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
$this->values = $arr;
return $this;
}