Repository navigation
feat(output): prometheus-remote-write push output, RW 1.0 and 2.0 (PIPE-1487, BP-470) - #320
Open
Dylan-M wants to merge 2 commits into
Conversation
Dylan-M
force-pushed
the
dylanmyers/pipe-1487-prometheus-remote-write-output-push-client
branch
from
September 24, 2026 16:43
f73ea85 to
606ad61
Compare
eKuG
requested changes
Sep 28, 2026
|
|
||
| // flush snapshots the buffered series under the lock, then encodes and POSTs | ||
| // them outside the lock so the HTTP round-trip never blocks writers. | ||
| func (o *Output) flush(ctx context.Context) error { |
There was a problem hiding this comment.
A flush can run from WriteMetric and from the timer loop at the same time, so two POSTs race. The newer one can land first, and Prometheus then rejects the older batch with 400: out of order sample for series {name="system_memory_utilization"}.
Also, a failed batch is dropped with no retry on 429/5xx.
…PE-1487) Assisted-By: Claude Opus 4.8
…_info per batch Assisted-By: Claude Opus 5.5
Dylan-M
force-pushed
the
dylanmyers/pipe-1487-prometheus-remote-write-output-push-client
branch
from
September 28, 2026 18:09
606ad61 to
5f0c352
Compare
eKuG
requested changes
Sep 28, 2026
| } | ||
|
|
||
| o.mu.Lock() | ||
| o.buf = append(o.buf, e) |
There was a problem hiding this comment.
Because the fix now retries, the buffer has no upper bound. WriteMetric appends to o.buf and never blocks, while the sender can spend minutes retrying a single batch. With the endpoint returning 429 + Retry-After: 1, the unsent backlog grew by about 19k series per second: 113,500 after 6 s, with one POST per second.
eKuG
added this pull request to stack #326
September 28, 2026 18:41
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Change
Adds a
prometheus-remote-writeoutput: a metrics-only push client that sends remote-write payloads to a configured endpoint. Remote-write 1.0 and 2.0 are both supported.Checklist