every hive runs its otel collector, and agents export to it by default
This commit is contained in:
parent
839efd1642
commit
13daf4c7dc
28 changed files with 245 additions and 303 deletions
|
|
@ -20,7 +20,6 @@ The SDK reads standard OTEL environment variables automatically:
|
|||
- `OTEL_EXPORTER_OTLP_ENDPOINT` — collector URL (**required**)
|
||||
- `OTEL_RESOURCE_ATTRIBUTES` — resource labels (`k=v,...`)
|
||||
|
||||
The harness populates both per-agent when
|
||||
`services.hyperhive.otel.enable = true`: an agent exports straight to
|
||||
The harness populates both in every agent container: an agent exports straight to
|
||||
its own hive's collector. See `docs/scheduler/observability.md` for
|
||||
the collector setup and the metrics hyperhive exports.
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
//! - `OTEL_EXPORTER_OTLP_HEADERS` — auth headers (`Key=Value,...`)
|
||||
//! - `OTEL_RESOURCE_ATTRIBUTES` — resource labels (`k=v,...`)
|
||||
//!
|
||||
//! The harness populates all of these per-agent when
|
||||
//! `services.hyperhive.otel.enable = true`.
|
||||
//! The harness populates all of these in every agent container.
|
||||
//!
|
||||
//! # Usage
|
||||
//! ```text
|
||||
|
|
@ -25,7 +24,7 @@ use opentelemetry_sdk::metrics::Temporality;
|
|||
#[derive(Parser)]
|
||||
#[command(
|
||||
name = "hive-metric",
|
||||
about = "Push a labeled metric to the OTEL collector (requires services.hyperhive.otel.enable = true)",
|
||||
about = "Push a labeled metric to the hive's OTEL collector",
|
||||
// Let a leading-minus value parse as the `value` positional rather than
|
||||
// being rejected as an unknown flag — negative gauges are legitimate
|
||||
// (e.g. a delta), and it lets the counter-sign check below produce a clear
|
||||
|
|
@ -90,7 +89,7 @@ fn main() -> Result<()> {
|
|||
if std::env::var("OTEL_EXPORTER_OTLP_ENDPOINT").is_err() {
|
||||
bail!(
|
||||
"OTEL_EXPORTER_OTLP_ENDPOINT not set — \
|
||||
enable OTEL in NixOS config (services.hyperhive.otel.enable = true)"
|
||||
an agent that sets services.hyperhive.agent.otel.enable = false has no collector"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue