Add push request count metric by type#7239
Open
SungJin1212 wants to merge 2 commits intocortexproject:masterfrom
Open
Add push request count metric by type#7239SungJin1212 wants to merge 2 commits intocortexproject:masterfrom
SungJin1212 wants to merge 2 commits intocortexproject:masterfrom
Conversation
78fce6b to
3a153db
Compare
yeya24
approved these changes
Jan 31, 2026
Contributor
yeya24
left a comment
There was a problem hiding this comment.
Overall it looks good. Thanks
|
|
||
| // Handler is a http.Handler which accepts WriteRequests. | ||
| func Handler(remoteWrite2Enabled bool, maxRecvMsgSize int, overrides *validation.Overrides, sourceIPs *middleware.SourceIPExtractor, push Func) http.Handler { | ||
| func Handler(remoteWrite2Enabled bool, maxRecvMsgSize int, overrides *validation.Overrides, sourceIPs *middleware.SourceIPExtractor, push Func, requestTotal *prometheus.CounterVec) http.Handler { |
Contributor
There was a problem hiding this comment.
Should we also count OTLP? That's a different push handler though
Member
Author
There was a problem hiding this comment.
Yeah, I added otlp type to the latest commit
| rw20WrittenExemplarsHeader = "X-Prometheus-Remote-Write-Exemplars-Written" | ||
|
|
||
| labelValuePRW1 = "prw1" | ||
| labelValuePRW2 = "prw2" |
Contributor
There was a problem hiding this comment.
Is prw2 a standard name we should use? I wonder if users know what it means.
It is mentioned in https://prometheus.io/docs/specs/prw/remote_write_spec_2_0 though so maybe we can use it
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
3a153db to
7497c88
Compare
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.
This PR adds a
cortex_distributor_push_requests_totalcount metric to track the number of push requests by type.Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]