-
Notifications
You must be signed in to change notification settings - Fork 530
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
chore: add query-frontend option to select request headers in query logs #3383
chore: add query-frontend option to select request headers in query logs #3383
Conversation
fa6eae7
to
04ec072
Compare
For the pipeline failure, the test fails looks unrelated to my change:
For the linting I ran |
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.
LGTM, only to minor things.
Don't worry about this. CI flakiness. We can ignore this error. |
Co-authored-by: Mario <mariorvinas@gmail.com>
Co-authored-by: Mario <mariorvinas@gmail.com>
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.
LGTM. Thanks!
Ups, it seems the |
Sorry for the delay, fixed now. |
…ogs (grafana#3383) * chore: add query-frontend option to select request headers in query logs * chore: added changelog entry * Update modules/frontend/handler.go Co-authored-by: Mario <mariorvinas@gmail.com> * Update modules/frontend/handler.go Co-authored-by: Mario <mariorvinas@gmail.com> * chore: fix typo in a name --------- Co-authored-by: Mario <mariorvinas@gmail.com>
What this PR does:
Adding feature present in mimir and Loki, specifically grafana/mimir#5030 and grafana/loki#11422.
Adds a config option to the query-frontend to specify a list of request headers to include in query logs.
For example, setting -query-frontend.log-query-request-headers="X-Grafana-Org-Id" and sending a query with X-Grafana-Org-Id:1 results in query log lines that include header_x_grafana_org_id=1.
Which issue(s) this PR fixes:
Fixes #3342
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]