Watch
0
0
Fork
You've already forked hyperhive
0

remove otel.metricIntervalMs and the host-level otel.debug

Both are ignored with a warning through the same shim, now
nix/host-modules/hive-options-removed.nix.

- otel.metricIntervalMs: claude in every agent and hive-c0re's
  container-resource exporter run at the 60s default. The agent-level
  services.hyperhive.agent.otel.metricIntervalMs, set only by the meta
  render, goes too (warning shim in nix/agent-modules/otel-removed.nix).
- otel.debug: services.hyperhive.agent.otel.debug stays, documented and
  set in an agent's own config; the meta render no longer emits it.
This commit is contained in:
atlas 2026-10-16 17:29:33 +02:00 • committed by mara
commit 0a5f35bda3
14 changed files with 136 additions and 152 deletions

View file

@ -38,11 +38,13 @@ let
# The same agent over the other wire protocol. An exporter's NAME is what
# selects it, so this is where a defined exporter and the pipeline's
# reference to it can drift apart.
# reference to it can drift apart. Also an agent config still setting the
# removed metric interval.
agentOtelGrpc = agent {
otel.enable = true;
otel.endpoint = agentBridge;
otel.protocol = "grpc";
otel.metricIntervalMs = 10000;
};
agentNoOtel = shared.agentBare;
@ -116,6 +118,22 @@ let
in
(s.exporters ? otlp) && s.service.pipelines.logs.exporters == [ "otlp" ];
}
{
# Control: `agentOtel` sets no interval. The endpoint lookup shows the
# environment it reads is the one the OTEL SDKs get.
name = "an agent config setting the removed metric interval evaluates, warns, and exports none";
ok =
let
warned = lib.any (
w: lib.hasInfix "services.hyperhive.agent.otel.metricIntervalMs is removed and ignored" w
);
env = machine: machine.systemd.globalEnvironment;
in
warned agentOtelGrpc.warnings
&& !(warned agentOtel.warnings)
&& (env agentOtelGrpc) ? OTEL_EXPORTER_OTLP_ENDPOINT
&& !((env agentOtelGrpc) ? OTEL_METRIC_EXPORT_INTERVAL);
}
];
in
runGroup "agent-otel" cases