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

add http header log when query error or slow query occurs #6183

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

baosenle
Copy link

Describe Your Changes

add http header log when query error or slow query occurs to vmselect. It can be configured to -log.httpHeaders=X-Webauth-User1,...,X-Webauth-UserN.

Checklist

The following checks are mandatory:

@baosenle
Copy link
Author

issue: #6181

@baosenle
Copy link
Author

Hi, @valyala @zekker6 @hagen1778
Can you take a look at this PR?
Thanks.

@hagen1778
Copy link
Collaborator

@baosenle thanks for PR!
I like the idea, many people use headers to identify the client or subset of clients when IP address is just not enough.
But I think the implementation of this feature should also account for the following settings that also print the log messages about the client:

  • search.logQueryMemoryUsage
  • client has cancelled the request after %.3f seconds message

The flag name "log.httpHeaders" should be aligned with search.log naming pattern.
The implementation is missing tests and documentation changes for https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/README.md

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

Successfully merging this pull request may close these issues.

None yet

2 participants