Skip to content

Commit

Permalink
Cherry pick #11551 into k179 (#11553)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny Kopping authored Dec 27, 2023
1 parent 1da11e9 commit 27eed2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
##### Fixes
* [11074](https://github.com/grafana/loki/pull/11074) **hainenber** Fix panic in lambda-promtail due to mishandling of empty DROP_LABELS env var.
* [11195](https://github.com/grafana/loki/pull/11195) **canuteson** Generate tsdb_shipper storage_config even if using_boltdb_shipper is false
* [11551](https://github.com/grafana/loki/pull/11551) **dannykopping** Do not reflect label names in request metrics' "route" label.

##### Changes

Expand Down
7 changes: 6 additions & 1 deletion pkg/querier/queryrange/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,12 @@ func (c Codec) Path(r queryrangebase.Request) string {
case *LokiSeriesRequest:
return "loki/api/v1/series"
case *LabelRequest:
return request.Path() // NOTE: this could be either /label or /label/{name}/values endpoint. So forward the original path as it is.
if request.Values {
// This request contains user-generated input in the URL, which is not safe to reflect in the route path.
return "loki/api/v1/label/values"
}

return request.Path()
case *LokiInstantRequest:
return "/loki/api/v1/query"
case *logproto.IndexStatsRequest:
Expand Down

0 comments on commit 27eed2e

Please sign in to comment.