Watch
0
0
Fork
You've already forked hyperhive
0

queue collector exports on disk and retry without a time limit

This commit is contained in:
atlas 2026-10-26 22:28:23 +01:00
commit eac7f2a7c1

View file

@ -338,6 +338,32 @@ let
&& lib.hasInfix "Exporting failed" (lib.head f.logs.log_record)
&& lib.hasInfix "otlphttp/victorialogs" (lib.head f.logs.log_record);
}
{
# 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
# the collector restarts is gone for good. The queue has to sit on the
# `file_storage` extension, and the retry has to outlast a switch.
# Presence controls: the extension is defined and started, the queue is
# bounded, and the exporters carry their endpoints.
name = "the log exporters queue on disk and retry without a time limit";
ok =
let
s = otelSettings otelNoStores;
queued =
e:
e.sending_queue.enabled
&& e.sending_queue.storage == "file_storage"
&& e.sending_queue.queue_size > 0
&& e.retry_on_failure.enabled
&& e.retry_on_failure.max_elapsed_time == "0s";
in
queued s.exporters."otlphttp/victorialogs"
&& queued s.exporters.otlphttp
&& s.exporters."otlphttp/victorialogs" ? logs_endpoint
&& s.exporters.otlphttp.endpoint == "https://upstream.example/otel"
&& s.extensions ? file_storage
&& builtins.elem "file_storage" s.service.extensions;
}
{
# Presence control: the default sends both signals to the upstream, so
# the negative arms below cannot pass on a misspelled exporter name.