Watch
0
0
Fork
You've already forked hyperhive
0

otel: collectors drop their own export-failure lines instead of shipping them

This commit is contained in:
atlas 2026-11-14 22:13:39 +01:00 • committed by mara
commit 3fa926d7d6

View file

@ -341,6 +341,34 @@ let
&& lib.hasInfix "Exporting failed" (lib.head f.logs.log_record)
&& lib.hasInfix "otlphttp/victorialogs" (lib.head f.logs.log_record);
}
{
# 🩸 The host journal holds the host collector's own failure lines, and
# shipping them is more traffic into an outage. The condition is read
# from the shared file, so every tier's wiring check below asks about
# the same text. Presence controls: the exporter is named, the pipeline
# lists the processor before the resource stamp, and the self pipeline
# keeps its own store-only filter.
name = "the host-journal pipeline drops the collector's own export-failure lines before it exports";
ok =
let
s = otelSettings otelNoStores;
host = lib.filter (p: builtins.elem "journald" p.receivers) (lib.attrValues s.service.pipelines);
f = s.processors."filter/drop-own-export-failures";
cond = lib.head f.logs.log_record;
i =
lib.lists.findFirstIndex (x: x == "filter/drop-own-export-failures") (-1)
(lib.head host).processors;
in
lib.length host == 1
&& (lib.head host).exporters != [ ]
&& i >= 0
&& i < lib.length (lib.head host).processors - 1
&& lib.length f.logs.log_record == 1
&& lib.hasInfix "opentelemetry-collector.service" cond
&& lib.hasInfix "Exporting failed" cond
&& lib.hasInfix "sending queue is full" cond
&& s.processors ? "filter/drop-store-export-failures";
}
{
# The journald receiver saves its cursor before an entry reaches the
# exporter, so an entry in an in-memory queue when the store is down or