docs and option text: describe the sender stamp, drop the hive label
This commit is contained in:
parent
c529bab9ea
commit
ea84d746dd
1 changed files with 69 additions and 51 deletions
|
|
@ -25,7 +25,7 @@
|
|||
//! Also emits instruments whose subject is the hive itself rather than a
|
||||
//! container in it — see [`register_hive_instruments`]. They carry **no
|
||||
//! `agent` attribute**, and that absence is the point: it is what makes them
|
||||
//! selectable as `{hive!="", agent=""}`.
|
||||
//! selectable as `{sender!="", agent=""}`.
|
||||
|
||||
use std::sync::atomic::{AtomicU64, Ordering};
|
||||
use std::sync::{Arc, Mutex, OnceLock};
|
||||
|
|
@ -536,7 +536,7 @@ fn register_hive_instruments(meter: &opentelemetry::metrics::Meter) {
|
|||
///
|
||||
/// Named rather than written as a bare `&[]` at each call site because the
|
||||
/// emptiness is the load-bearing part — it is what makes these series
|
||||
/// selectable as `{hive!="", agent=""}`. A bare empty slice reads like nothing
|
||||
/// selectable as `{sender!="", agent=""}`. A bare empty slice reads like nothing
|
||||
/// was decided; this one has a test asserting no `agent` key ever appears in
|
||||
/// it, so "helpfully" labelling the hive family per-agent goes red.
|
||||
const HIVE_ATTRS: &[KeyValue] = &[];
|
||||
|
|
@ -573,11 +573,10 @@ fn attrs(c: &ContainerResource) -> Vec<KeyValue> {
|
|||
/// Resource: `service.name = hyperhive-c0re`, the host architecture, the
|
||||
/// running hyperhive revision, plus whatever the operator set in
|
||||
/// `deploy.hive-controller.otel.extraResourceAttributes` (same channel the
|
||||
/// agent-side export uses; the `hive` label is stamped by the swarm
|
||||
/// collector, not set here).
|
||||
/// agent-side export uses; the swarm collector stamps `sender`, 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
|
||||
/// reason `swarm` does: they are constant across one `hive-c0re`. Only
|
||||
/// facts that vary per container (see [`attrs`]) are per-data-point.
|
||||
///
|
||||
/// `service.version` is the **flake revision**, not the crate version — the
|
||||
|
|
@ -667,7 +666,7 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
/// The hive family must not be labelled per-agent: `{hive!="", agent=""}`
|
||||
/// The hive family must not be labelled per-agent: `{sender!="", agent=""}`
|
||||
/// is the whole selector that distinguishes "a measurement of the hive"
|
||||
/// from "a measurement of an agent that happens to live in one", and a
|
||||
/// single `agent` attribute here collapses the two.
|
||||
|
|
|
|||
Loading…
Reference in a new issue