Skip to content

Commit

Permalink
querymiddleware: Add config for propagating additional headers (#10334)
Browse files Browse the repository at this point in the history
  • Loading branch information
leizor authored Jan 3, 2025
1 parent 1aec7e3 commit 2a4ba9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/frontend/querymiddleware/roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ type Config struct {
ExtraInstantQueryMiddlewares []MetricsQueryMiddleware `yaml:"-"`
ExtraRangeQueryMiddlewares []MetricsQueryMiddleware `yaml:"-"`

ExtraPropagateHeaders []string `yaml:"-"`

QueryResultResponseFormat string `yaml:"query_result_response_format"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/mimir/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ func (t *Mimir) initFlusher() (serv services.Service, err error) {
// initQueryFrontendCodec initializes query frontend codec.
// NOTE: Grafana Enterprise Metrics depends on this.
func (t *Mimir) initQueryFrontendCodec() (services.Service, error) {
t.QueryFrontendCodec = querymiddleware.NewPrometheusCodec(t.Registerer, t.Cfg.Querier.EngineConfig.LookbackDelta, t.Cfg.Frontend.QueryMiddleware.QueryResultResponseFormat, nil)
t.QueryFrontendCodec = querymiddleware.NewPrometheusCodec(t.Registerer, t.Cfg.Querier.EngineConfig.LookbackDelta, t.Cfg.Frontend.QueryMiddleware.QueryResultResponseFormat, t.Cfg.Frontend.QueryMiddleware.ExtraPropagateHeaders)
return nil, nil
}

Expand Down

0 comments on commit 2a4ba9b

Please sign in to comment.