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
iris 6739bb903d docs: sort the top-level directories into five sections by what the reader wants
Every docs directory moves under 1-getting-started, 2-handbook,
4-implementation or 5-project; the options reference (section 3) comes from
the website and has no directory here. trust-boundary stays whole under the
handbook for now. web-ui, swarm and tools split between handbook and
implementation, and the command-line references move to
2-handbook/reference. Links, path references in code and nix, and the docs
index follow the moves; no page content changes.
2026-11-06 18:46:57 +01:00
..
src every hive runs its otel collector, and agents export to it by default 2026-10-19 18:35:17 +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: sort the top-level directories into five sections by what the reader wants 2026-11-06 18:46:57 +01: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 in every agent container: an agent exports straight to its own hive's collector. See docs/4-implementation/scheduler/observability.md for the collector setup and the metrics hyperhive exports.