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

feat: add query user and query source to "executing query" log lines #14320

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

cstyan
Copy link
Contributor

@cstyan cstyan commented Sep 30, 2024

We add a lot of metadata type info. about a query to QueryTags header but don't log much of it the executing query logs. At the very least, pulling out the Grafana username and query source (alert, explore app, etc.) would be useful to determine the source of increased incoming query requests.

@cstyan cstyan requested a review from a team as a code owner September 30, 2024 17:48
Signed-off-by: Callum Styan <callumstyan@gmail.com>
@cstyan cstyan force-pushed the callum-executing-info branch from 04888bf to 72a2a19 Compare September 30, 2024 18:55
@pull-request-size pull-request-size bot added size/S and removed size/M labels Sep 30, 2024
Copy link
Collaborator

@trevorwhitney trevorwhitney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Signed-off-by: Callum Styan <callumstyan@gmail.com>
@pull-request-size pull-request-size bot added size/M and removed size/S labels Sep 30, 2024
Signed-off-by: Callum Styan <callumstyan@gmail.com>
@cstyan cstyan merged commit 4d69929 into main Sep 30, 2024
61 checks passed
@cstyan cstyan deleted the callum-executing-info branch September 30, 2024 20:23
@loki-gh-app
Copy link
Contributor

loki-gh-app bot commented Sep 30, 2024

Hello @cstyan!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

@cstyan cstyan added type/bug Somehing is not working as expected backport k222 and removed backport k222 labels Sep 30, 2024
loki-gh-app bot pushed a commit that referenced this pull request Sep 30, 2024
…14320)

Signed-off-by: Callum Styan <callumstyan@gmail.com>
(cherry picked from commit 4d69929)
jeschkies pushed a commit to jeschkies/loki that referenced this pull request Oct 1, 2024
@mveitas
Copy link
Contributor

mveitas commented Nov 22, 2024

@cstyan @trevorwhitney Is there something that needs to be done to enable the user information from Grafana to show up in these logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport k222 size/M type/bug Somehing is not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants