Skip to main content

Module push_task

Module push_task 

Source
Expand description

Periodic push of prometheus::Registry snapshots to a remote-write endpoint. A final flush runs on shutdown. Errors are warn!-logged, never fatal; HTTP 429 triggers one shared ERROR via crate::rate_limit::log_rate_limit_once.

FunctionsΒ§

apply_external_labels πŸ”’
Stamp push-time labels onto every TimeSeries (existing labels win), then re-sort to stay remote-write 1.0 compliant.
push_once πŸ”’
run πŸ”’
Run the periodic push loop until shutdown resolves, driving one final flush on the way out. Returns early if the HTTP client can’t be built.