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

View file

@ -49,11 +49,13 @@ let
# Every hive defaults the agents' queue address to the queue's name, so the
# only hive without one is a hive told to have none. Also the host still
# setting the two removed `c0re` options; no case on its queue reads them.
# setting the four removed host options; no case on its queue reads them.
noAgentQueue = hiveWithController {
deploy.hive-controller.queue.agentNatsUrl = null;
c0re.operatorPronouns = "they/them";
c0re.contextWindowTokens.sonnet = 900000;
otel.metricIntervalMs = 10000;
otel.debug = true;
};
# On the store's host, which mints the runner's store identity.
@ -243,17 +245,19 @@ let
!(e ? HIVE_AGENT_NATS_URL) && !(e ? HIVE_AGENT_OIDC_TOKEN_ENDPOINT);
}
{
# Control: `bare` sets neither option, and its serve.json carries the
# Control: `bare` sets none of them, and its serve.json carries the
# dashboard port, so the key lookup reads a real document.
name = "a definition of a removed c0re option evaluates, warns, and reaches no serve.json";
name = "a definition of a removed host option evaluates and warns, and the c0re ones reach no serve.json";
ok =
let
warned =
m: option:
lib.any (w: lib.hasInfix "services.hyperhive.c0re.${option} is removed and ignored" w) m.warnings;
lib.any (w: lib.hasInfix "services.hyperhive.${option} is removed and ignored" w) m.warnings;
options = [
"operatorPronouns"
"contextWindowTokens"
"c0re.operatorPronouns"
"c0re.contextWindowTokens"
"otel.metricIntervalMs"
"otel.debug"
];
hasKey = m: key: lib.hasInfix "\"${key}\":" m.environment.etc."hyperhive/serve.json".text;
noRemovedKeys =