-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 query-frontend option to select request headers in query logs #11499
Add query-frontend option to select request headers in query logs #11499
Conversation
Trivy scan found the following vulnerabilities:
|
2dabec3
to
bfb9da2
Compare
Not sure how to safely update docs. |
@jmichalek132 I'm not quite sure what you mean by "safely" update the docs? All docs updates are published to the "next" branch until the next Loki release is cut. Doc updates aren't published to the current release unless someone backports the PR. So any changes to docs won't published until the code changes are part of a release. You can either do the docs updates as part of this PR (my recommendation) or as a separate PR. |
Hi, sorry for the late reply, I meant if there is something in the makefile that would generate the the docs for flags from the code, or is it just maintained manually? |
@jmichalek132 The configuration reference and Helm reference are the only docs that I know of that we're automatically generating, as far as I know we're not generating any docs from Go files. |
@JStickler I updated the docs. |
@jmichalek132 The configuration reference should be updated in |
I haven't modified that file directly, I ran |
Looks like we've got a file conflict, and this build error message "Please format code by running 'make format' and committing the changes" that needs fixing. |
Fixed both. |
fyi the conflict comes from changelog, and will happen every time someone else updates. it. |
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.
Very cool, thank you for your contribution @jmichalek132 👍
Can you please fix up the CHANGELOG.md file and then I'll merge? I fixed it up.
…afana#11499) **What this PR does / why we need it**: Adding feature present in mimir, specifically grafana/mimir#5030. Adds a config option to the query-frontend to specify a list of request headers to include in query logs. For example, setting -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 grafana#11422
What this PR does / why we need it:
Adding feature present in mimir, specifically grafana/mimir#5030.
Adds a config option to the query-frontend to specify a list of request headers to include in query logs.
For example, setting -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 #11422
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updatedadd-to-release-notes
labeldocs/sources/setup/upgrade/_index.md
production/helm/loki/Chart.yaml
and updateproduction/helm/loki/CHANGELOG.md
andproduction/helm/loki/README.md
. Example PRdeprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR