Watch
0
0
Fork
You've already forked hyperhive
0

container collectors scrape their own telemetry and push it up their hop

This commit is contained in:
atlas 2026-10-28 22:01:33 +01:00 • committed by mara
commit 73c966a7eb

View file

@ -72,6 +72,11 @@ let
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = "cumulative";
};
# Where the collector serves its own metrics, inside the container's own
# netns. Not the binary's default 8888, which the collector dashboard
# reads as the hive collector's.
selfTelemetryPort = 8904;
# The exporter's NAME picks the wire protocol, so `protocol` has to be
# read here as well as handed to the SDKs above — same expression as the
# swarm tier's upstream exporter in nix/host-modules/swarm-otel.nix.
@ -296,5 +301,14 @@ in
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 {
inherit lib;
port = selfTelemetryPort;
exporter = logExporter;
attributes.agent = userName;
};
};
}