miniproto.observability.MetricEvent
miniproto.observability.MetricEvent
Section titled “miniproto.observability.MetricEvent”MetricEvent(name: str, value: float, unit: str = 'count', attributes: Mapping[str, object] = dict(), timestamp: float = time.time()) -> NoneImmutable metric event recorded with a unit, attributes and wall-clock timestamp.
Attributes:
- name (
str) – Metric name. - value (
float) – Numeric measurement. - unit (
str) – Unit label, defaulting to"count". - attributes (
Mapping[str, object]) – Metric dimensions, shallow-copied byInMemoryMetrics.record_metric. ConstructingMetricEventdirectly retains the supplied mapping. - timestamp (
float) – Wall-clock record time in seconds since the epoch.