| Filename | Latest commit message | Latest commit date |
|---|---|---|
A stateless one-shot CLI can't track a running total across invocations, so cumulative-by-default semantics required a caller to already know and report the accumulated value every time -- awkward for the common case (an agent incrementing a counter by 1 per event). Delta is now the default: send the contribution since the last report, and the collector accumulates. --temporality cumulative is available for the rare caller that already tracks its own running total. gauge behavior unchanged. |
||
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
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 ...]
Standard OTEL environment variables are read automatically by the SDK:
OTEL_EXPORTER_OTLP_ENDPOINT— collector URL (required)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. See docs/observability.md for the
collector setup and the metrics hyperhive exports.