Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-metric
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-02 11:40:07 +02:00
..
src hive-metric: delta counters by default, cumulative opt-in 2026-08-30 20:03:44 +02:00
Cargo.toml swarm-controller: move OTEL deps to workspace level, drop jobq_metrics singleton 2026-08-19 18:10:22 +02:00
README.md docs(readmes): drop mentions of nonexistent fields 2026-10-02 11:40:07 +02:00

hive-metric

A tiny CLI that pushes a single labeled metric to the OTEL collector, then exits. Built on the OpenTelemetry Rust SDK with the OTLP HTTP/JSON exporter.

When to use it

For emitting a one-off counter or gauge from a shell script or systemd unit without embedding an OTEL SDK in the caller — the harness and various hive scripts use it to record per-agent metrics.

Usage

hive-metric <name> <value> [--type counter|gauge] [--labels key=value ...]

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 its own hive's collector. See docs/scheduler/observability.md for the collector setup and the metrics hyperhive exports.