| Filename | Latest commit message | Latest commit date |
|---|---|---|
`default-features = false` on opentelemetry-otlp was written to trim transports and dropped `internal-logs` with them, so every otel_warn! and otel_debug! inside that crate compiled to nothing. The failure that matters is the one which returns HTTP 200: the collector accepts the request and rejects the data points, and HttpMetricsClient.PartialSuccess is the only place the rejection count and the collector's reason are ever surfaced. The feature is per-crate, not per-workspace: the macros are exported by the opentelemetry API crate but their cfg and CARGO_PKG_NAME resolve in the calling crate, so the API crate and the SDK had internal logs on while the exporter did not. hive-metric keeps the identical declaration on purpose - it installs no tracing subscriber, so the feature would be inert there and would only mislead. Both files now record which side of that they are on, and the stale "same features as hive-metric" comment is corrected. Not sufficient on its own: a hard export failure is logged by the SDK at debug on the compiled timer path, so it stays below the info filter. That needs a level rather than a feature and is left to review. |
||
| .. | ||
| 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.