diff --git a/nix/templates/harness-base.nix b/nix/templates/harness-base.nix index c3367bf7..58d2b15f 100644 --- a/nix/templates/harness-base.nix +++ b/nix/templates/harness-base.nix @@ -1775,6 +1775,13 @@ in // otelEnv; serviceConfig = { ExecStart = if otel.enable then "${otelExecStart}" else "${pkgs.hyperhive}/bin/${binary} serve"; + # Pin the journal identity to the binary name. Without this, + # systemd derives SyslogIdentifier from the ExecStart basename — + # which under OTEL is the wrapper script's store path + # (`-hive-serve-otel`), so every agent's harness logs showed + # that opaque name instead of `hive`. Set explicitly so the + # identity is stable across the otel / non-otel ExecStart branches. + SyslogIdentifier = binary; Restart = "on-failure"; RestartSec = 2; # Per-service runtime dir owned by `User=` below; the harness