-
Notifications
You must be signed in to change notification settings - Fork 850
Add push request count metric by type #7239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add push request count metric by type #7239
Conversation
78fce6b to
3a153db
Compare
yeya24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also count OTLP? That's a different push handler though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I added otlp type to the latest commit
| rw20WrittenExemplarsHeader = "X-Prometheus-Remote-Write-Exemplars-Written" | ||
|
|
||
| labelValuePRW1 = "prw1" | ||
| labelValuePRW2 = "prw2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Signed-off-by: SungJin1212 <[email protected]>
3a153db to
7497c88
Compare
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]