remote write: fix sent_batch_duration_seconds measuring before the request is sent#18214
Merged
cstyan merged 2 commits intoprometheus:mainfrom Mar 3, 2026
Merged
Conversation
…quest was sent Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
kgeckhart
added a commit
to grafana/alloy
that referenced
this pull request
Mar 2, 2026
…ng before the request was sent (#5697) `prometheus_remote_storage_sent_batch_duration_seconds` was measuring before the HTTP request was sent rather than after, causing the metric to reflect encoding/serialization time rather than the actual send duration. Applies the fix from prometheus/prometheus#18214 via a fork replace directive pointing to https://github.com/grafana/prometheus/tree/fix-sent-batch-duration-v0.309.1. Remove the replace directive when upstream PR #18214 is merged and Prometheus is upgraded.
grafana-alloybot bot
pushed a commit
to grafana/alloy
that referenced
this pull request
Mar 2, 2026
…ng before the request was sent (#5697) `prometheus_remote_storage_sent_batch_duration_seconds` was measuring before the HTTP request was sent rather than after, causing the metric to reflect encoding/serialization time rather than the actual send duration. Applies the fix from prometheus/prometheus#18214 via a fork replace directive pointing to https://github.com/grafana/prometheus/tree/fix-sent-batch-duration-v0.309.1. Remove the replace directive when upstream PR #18214 is merged and Prometheus is upgraded. (cherry picked from commit 10cfb6c)
cstyan
reviewed
Mar 2, 2026
kgeckhart
added a commit
to grafana/alloy
that referenced
this pull request
Mar 2, 2026
…ng before the request was sent [backport] (#5698) ## Backport of #5697 This PR backports #5697 to release/v1.14. ### Original PR Author @kgeckhart ### Description `prometheus_remote_storage_sent_batch_duration_seconds` was measuring before the HTTP request was sent rather than after, causing the metric to reflect encoding/serialization time rather than the actual send duration. Applies the fix from prometheus/prometheus#18214 via a fork replace directive pointing to https://github.com/grafana/prometheus/tree/fix-sent-batch-duration-v0.309.1. Remove the replace directive when upstream PR #18214 is merged and Prometheus is upgraded. --- *This backport was created automatically.* Co-authored-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
Member
|
rerunning the failed windows tests, failures don't look related to your changes |
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.
The refactor in #17441 moved the latency metric to measure before the request was sent causing it to be an inaccurate measurement.
Which issue(s) does the PR fix:
N/A
Does this PR introduce a user-facing change?