function Metric::setMetadata
Additional metadata attributes that describe the metric. [Optional]. Attributes are non-identifying. Consumers SHOULD NOT need to be aware of these attributes. These attributes MAY be used to encode information allowing for lossless roundtrip translation to / from another data model. 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 metadata = 12;</code>
Parameters
\Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var:
Return value
$this
File
-
vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Metrics/ V1/ Metric.php, line 399
Class
- Metric
- Defines a Metric which has one or more timeseries. The following is a brief summary of the Metric data model. For more details, see: https://github.com/open-telemetry/opentelemetry-specification/blob/main… The data…
Namespace
Opentelemetry\Proto\Metrics\V1Code
public function setMetadata($var) {
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
$this->metadata = $arr;
return $this;
}