You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
For greater visibility into the source of a query, add the ability in Loki to log the value of an arbitrary set of request headers in the query frontend stats log.
For example, if a Loki operator wanted to log the originating IP address of the sender after being sent the data through a proxy, adding the header X-Forwarded-For could be added to this configuration to log the IP address to the query stats log.
Describe alternatives you've considered
There is support for logging key values present in a header X-Query-Tags. But that would require proxy populating those headers. Instead I think it would make sense to support something that is already supported in Mimir.
Additional context
Linking original issue for implementing the same in mimir grafana/mimir#4815.
If maintainer are willing to accept this change I am willing to implement it.
The text was updated successfully, but these errors were encountered:
…1499)
**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
…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**:
Fixesgrafana#11422
Is your feature request related to a problem? Please describe.
For greater visibility into the source of a query, add the ability in Loki to log the value of an arbitrary set of request headers in the query frontend stats log.
For example, if a Loki operator wanted to log the originating IP address of the sender after being sent the data through a proxy, adding the header X-Forwarded-For could be added to this configuration to log the IP address to the query stats log.
Describe the solution you'd like
Implementing similiar functionality as grafana/mimir#5030 in loki. Specifically for this log line https://github.com/jmichalek132/loki/blob/main/pkg/logql/metrics.go#L120.
Describe alternatives you've considered
There is support for logging key values present in a header
X-Query-Tags
. But that would require proxy populating those headers. Instead I think it would make sense to support something that is already supported in Mimir.Additional context
Linking original issue for implementing the same in mimir grafana/mimir#4815.
If maintainer are willing to accept this change I am willing to implement it.
The text was updated successfully, but these errors were encountered: