function ResourceMetrics::setResource
The resource for the metrics in this message. If this field is not set then no resource info is known.
Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
Parameters
\Opentelemetry\Proto\Resource\V1\Resource $var:
Return value
$this
File
-
vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Metrics/ V1/ ResourceMetrics.php, line 96
Class
- ResourceMetrics
- A collection of ScopeMetrics from a Resource.
Namespace
Opentelemetry\Proto\Metrics\V1Code
public function setResource($var) {
GPBUtil::checkMessage($var, \Opentelemetry\Proto\Resource\V1\Resource::class);
$this->resource = $var;
return $this;
}