Skip to content
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

Query-frontend: Set value of remote_user field in Slow Query Logs from HTTP header #7363

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

wndhydrnt
Copy link

@wndhydrnt wndhydrnt commented May 15, 2024

Fixes #7360.

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

  • Add new flag to query-frontend command.
  • Set value of remote_user field from header if flag is set.
  • Update docs.

Verification

  1. Build thanos binary locally.
  2. Start Query Frontend component. Point it to an instance of Query. Pass --query-frontend.slow-query-logs-user-header=<test header> and --query-frontend.log-queries-longer-than=1s.
  3. Send request to /api/v1/query that contains a long-running query and sets the <test header>.

@wndhydrnt wndhydrnt force-pushed the slow-query-logs-user-header branch from 430039c to 21020e9 Compare May 15, 2024 13:11
@wndhydrnt wndhydrnt changed the title Query-frontend: Set remote_user in Slow Query Logs from HTTP header Query-frontend: Set value of remote_user field in Slow Query Logs from HTTP header May 15, 2024
@wndhydrnt wndhydrnt marked this pull request as ready for review May 15, 2024 14:07
Signed-off-by: Markus Meyer <m.meyer@mytaxi.com>
Signed-off-by: Markus Meyer <m.meyer@mytaxi.com>
Signed-off-by: Markus Meyer <m.meyer@mytaxi.com>
Signed-off-by: Markus Meyer <m.meyer@mytaxi.com>
@wndhydrnt wndhydrnt force-pushed the slow-query-logs-user-header branch from 934fef0 to 25ff6b6 Compare May 17, 2024 12:08
fpetkovski
fpetkovski previously approved these changes May 21, 2024
Signed-off-by: Markus Meyer <hydrantanderwand@gmail.com>
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.

Read value of remote_user in Slow Query Logs of Query Frontend from a HTTP header
2 participants