Skip to content

MetricMetadata

Source code in docs_src/capo_cloudwatchomni/types/metric_metadata.py
class MetricMetadata(TypedDict, closed=True):
    name: NotRequired["str"]
    """The metric name as emitted, such as "Duration"."""
    preferred_stat: NotRequired["str"]
    """The statistic to chart or alarm on, such as "p99" or "Sum". Free-form and frequently absent."""
    metric_type: NotRequired["str"]
    """OTel metric kind: "gauge", "sum", "histogram", "exponential_histogram", or "summary" (CloudWatch-vended metrics carry the same kinds). Absent when the producer did not report one."""
    attributes: NotRequired[
        "capo_cloudwatchomni.types.metadata_attribute_map.MetadataAttributeMap"
    ]
    """Per-metric qualifying attributes used to query this metric's telemetry. Keys are the metric store's own label names, not bare OTel attribute names: service identity arrives as "@resource.service.name" and "@resource.service.namespace", and the instrumentation scope as "@instrumentation.@name", while span-derived metrics label the service as a bare "service.name". Cloud provider, account and region are not repeated per metric — read those from the node. Values are RAW, deliberately NOT the node's normalized or merged identity, so a selector built from them matches the emitted series. A merged node can carry different values per metric, which is why these live here rather than on the node."""
    semantics: NotRequired["capo_cloudwatchomni.types.metric_semantics.MetricSemantics"]
    """What the metric means and the unit it is reported in."""

attributes instance-attribute

attributes: NotRequired[MetadataAttributeMap]

Per-metric qualifying attributes used to query this metric's telemetry. Keys are the metric store's own label names, not bare OTel attribute names: service identity arrives as "@resource.service.name" and "@resource.service.namespace", and the instrumentation scope as "@instrumentation.@name", while span-derived metrics label the service as a bare "service.name". Cloud provider, account and region are not repeated per metric — read those from the node. Values are RAW, deliberately NOT the node's normalized or merged identity, so a selector built from them matches the emitted series. A merged node can carry different values per metric, which is why these live here rather than on the node.

metric_type instance-attribute

metric_type: NotRequired[str]

OTel metric kind: "gauge", "sum", "histogram", "exponential_histogram", or "summary" (CloudWatch-vended metrics carry the same kinds). Absent when the producer did not report one.

name instance-attribute

name: NotRequired[str]

The metric name as emitted, such as "Duration".

preferred_stat instance-attribute

preferred_stat: NotRequired[str]

The statistic to chart or alarm on, such as "p99" or "Sum". Free-form and frequently absent.

semantics instance-attribute

semantics: NotRequired[MetricSemantics]

What the metric means and the unit it is reported in.