-
Notifications
You must be signed in to change notification settings - Fork 812
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
Add cortex_query_samples_total metric #6142
Add cortex_query_samples_total metric #6142
Conversation
2454692
to
e3ee864
Compare
e3ee864
to
625dfb0
Compare
b10a60f
to
7b247fc
Compare
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.
Thanks
pkg/frontend/transport/handler.go
Outdated
@@ -116,6 +117,11 @@ func NewHandler(cfg HandlerConfig, roundTripper http.RoundTripper, log log.Logge | |||
Help: "Number of series fetched to execute a query.", | |||
}, []string{"user"}) | |||
|
|||
h.querySamples = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ | |||
Name: "cortex_query_samples_total", | |||
Help: "Number of samples to execute a query.", |
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.
Number of samples fetched
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.
Fixed it. Thanks for the review. @yeya24
Signed-off-by: kade.lee <[email protected]>
7b247fc
to
c13a766
Compare
I like that! :) |
What this PR does:
Add a new per tenant metric called cortex_query_samples_total which contains the number of fetched samples for each query requests. It provides an accurate count of fetched samples for each tenants.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,x
,[BUGFIX]