Skip to content

Put query field at the end of query stats log #5622

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

Merged
merged 3 commits into from
Oct 28, 2023

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Oct 27, 2023

What this PR does:

Put the query field at the end to avoid truncating other fields in the log.

Some logging system has max length limitation. query param can go very long especially when users are using * together with Grafana template variables so the query string might contain all their label values.

When query stats log got truncated, some useful information might be missed like time range, status code, user agent, etc

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
@yeya24 yeya24 merged commit 1dfd5f9 into cortexproject:master Oct 28, 2023
@yeya24 yeya24 deleted the no-truncate-qfe-logs branch October 28, 2023 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants