Skip to content

Include response series count in query stats log #6421

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

Closed
yeya24 opened this issue Dec 12, 2024 · 2 comments · Fixed by #6423
Closed

Include response series count in query stats log #6421

yeya24 opened this issue Dec 12, 2024 · 2 comments · Fixed by #6423

Comments

@yeya24
Copy link
Contributor

yeya24 commented Dec 12, 2024

Is your feature request related to a problem? Please describe.
There is a query stats log in Query Frontend which is useful to gather query insights and debug. https://github.com/cortexproject/cortex/blob/master/pkg/frontend/transport/handler.go#L375

What is missing now is the number of series in the response. It would be good to include this info for query insights purpose.

We can start this for instant query and range queries.

Describe the solution you'd like
We encode query response to JSON here https://github.com/cortexproject/cortex/blob/master/pkg/querier/tripperware/roundtrip.go#L214.

We can try to extract the series count here and pass down using querier stats.

@SungJin1212
Copy link
Member

It looks nice, can I take it?

@yeya24
Copy link
Contributor Author

yeya24 commented Dec 13, 2024

Yes you can go ahead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants