Watch
0
0
Fork
You've already forked hyperhive
0

swarm-otel's own logs go only to the store, so an upstream export failure no longer feeds itself

The logs/self pipeline shipped the collector's own journal to the upstream
exporter too. When the upstream failed, the collector logged the failure,
journald/self read it, and logs/self sent it upstream again: ~8 lines/s.

logs/self now exports only to otlphttp/victorialogs, and a filter processor
drops the collector's failure lines that name that exporter, so the store
exporter cannot rebuild the loop one hop later. Other collector lines,
including upstream failures, still reach the store.

On deploy, swarm-otel's store rows drop from ~8/s of error spam to its real
output.
This commit is contained in:
atlas 2026-10-20 00:13:25 +02:00 • committed by mara
commit 8d70afd93e
3 changed files with 52 additions and 3 deletions

View file

@ -1245,16 +1245,21 @@ in
];
exporters = logExporterNames;
};
# This container's own journal goes straight to the stores,
# This container's own journal goes straight to the store,
# not through `otlp/<name>`: a collector forwarding to
# itself would need its own receiver up first.
#
# The store only, never the upstream: an upstream export
# failure is logged here, and shipping that line upstream
# fails again and logs again, forever.
"logs/self" = {
receivers = [ "journald/self" ];
processors = [
"filter/drop-store-export-failures"
"resource/self-journal"
"resource/${swarmTierName}"
];
exporters = logExporterNames;
exporters = [ "otlphttp/victorialogs" ];
};
};
}
@ -1458,6 +1463,17 @@ in
''IsMatch(body["_SYSTEMD_SLICE"], "^user-[0-9]+\\.slice$")''
];
};
# The store exporter's own failure lines cannot reach the
# store, and re-feeding them to it repeats the failure.
# Failures of any other exporter pass. `body` is the journal
# entry as a map, the collector's message under `MESSAGE`.
"filter/drop-store-export-failures" = {
error_mode = "ignore";
logs.log_record = [
''IsMatch(body["MESSAGE"], "Exporting failed") and IsMatch(body["MESSAGE"], "otlphttp/victorialogs")''
];
};
};
};
};