ReceivedMetric
A metric decoded from an OTLP ExportMetricsServiceRequest by OtlpDecoder.
$type is one of 'gauge', 'sum', 'histogram' — the only three shapes TelemetryMiddleware emits. Other OTLP metric types (exponential histogram, summary) are skipped by the decoder rather than represented here.
Synopsis
Section titled “Synopsis”final class ReceivedMetric
| Source | ReceivedMetric.php |
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
$dataPoints | array | readonly. |
$name | string | readonly. |
$resourceAttributes | array | readonly. |
$type | string | readonly. |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(string $name, 'gauge'|'sum'|'histogram' $type, array<ReceivedDataPoint> $dataPoints, array<string, mixed> $resourceAttributes): mixed
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$type | `‘gauge’“ | 'sum' |
$dataPoints | array``<ReceivedDataPoint> | |
$resourceAttributes | array``<``string``, ``mixed``> |
Returns mixed