Watch
0
0
Fork
You've already forked hyperhive
0

merge the self-scrape into each collector's settings instead of defining them twice

This commit is contained in:
atlas 2026-10-28 22:20:24 +01:00 • committed by mara
commit a00bcb8c05
2 changed files with 243 additions and 241 deletions

View file

@ -215,7 +215,8 @@ in
# and the collector then dies at startup. Same caveat as both other
# tiers; see nix/host-modules/otel.nix for the measurement.
validateConfigFile = true;
settings = {
settings = lib.mkMerge [
{
# `journalctl --follow --lines=0` (what this receiver runs under
# the hood) ships only what's written *after* it starts — every
# collector start has a silent gap at the front. `storage:` below
@ -299,16 +300,16 @@ in
# journald receiver's `storage: file_storage` above would name a
# component the collector never starts.
service.extensions = [ "file_storage" ];
};
};
}
# Every agent container has a network namespace of its own, so they can all
# use the same port.
services.opentelemetry-collector.settings = import ../collector-self-scrape.nix {
(import ../collector-self-scrape.nix {
inherit lib;
port = selfTelemetryPort;
exporter = logExporter;
attributes.agent = userName;
})
];
};
};
}

View file

@ -4438,7 +4438,8 @@ in
# caveat as every other tier; see nix/host-modules/otel.nix for
# the measurement.
validateConfigFile = true;
settings = {
settings = lib.mkMerge [
{
# `journalctl --follow --lines=0` (what the receiver runs under
# the hood) ships only what is written *after* it starts, so
# every collector start has a silent gap at the front. This
@ -4584,16 +4585,16 @@ in
"file_storage"
forwarderAuthName
];
};
};
}
# Off the built-in default of `localhost:8888`, which the hive tier
# holds: this container shares the host's netns.
services.opentelemetry-collector.settings = import ../collector-self-scrape.nix {
(import ../collector-self-scrape.nix {
inherit lib;
port = cfg.otel.telemetryPort;
exporter = "otlphttp";
attributes.container = collectorServiceName;
})
];
};
# How the secret crosses the sandbox. The host unit