diff --git a/docs/scheduler/observability.md b/docs/scheduler/observability.md index 59abf7a8..ce560205 100644 --- a/docs/scheduler/observability.md +++ b/docs/scheduler/observability.md @@ -208,8 +208,8 @@ The swarm's collector adds `hive`, the name of the hive whose receiver accepted the push (see [Authenticated ingest](#authenticated-ingest)). The container doesn't set it. -Append additional labels via `extraResourceAttributes` (see option -reference above); pass custom per-data-point labels with +Append additional swarm-wide labels via `extraResourceAttributes` (see +option reference above); pass custom per-data-point labels with `hive-metric --labels` (see below). ## Log severity @@ -322,9 +322,10 @@ exists, so off-the-shelf OTEL/Grafana container dashboards work. Resource The `hyperhive.`-prefixed metrics have no semconv equivalent (memory limit + peak, on-disk footprint, and an instantaneous cpu percent kept -alongside the spec `container.cpu.time` counter for convenience). Hive -labels (`hive`, `swarm`, …) ride on the resource via -`extraResourceAttributes`. +alongside the spec `container.cpu.time` counter for convenience). The `swarm` +label rides on the resource, and the swarm collector adds `hive` from the +receiver that accepted the sample. `extraResourceAttributes` is swarm-wide, so +it can't carry a per-hive label. diff --git a/hive-c0re/src/stats/otel_metrics.rs b/hive-c0re/src/stats/otel_metrics.rs index 36ae37bb..40c4d6bd 100644 --- a/hive-c0re/src/stats/otel_metrics.rs +++ b/hive-c0re/src/stats/otel_metrics.rs @@ -347,8 +347,9 @@ fn attrs(c: &ContainerResource) -> Vec { /// Resource: `service.name = hyperhive-c0re`, the host architecture, the /// running hyperhive revision, plus whatever the operator set in -/// `extraResourceAttributes` (where the hive `hive` / `swarm` labels live, same -/// channel the agent-side export uses). +/// `swarm.hiveOtel.extraResourceAttributes` (swarm-wide labels, same channel +/// the agent-side export uses; the `hive` label is stamped by the swarm +/// collector, not set here). /// /// These belong on the resource rather than on each data point for the same /// reason `hive` / `swarm` do: they are constant across one `hive-c0re`. Only