Prometheus: Use contextual middleware for req headers and simplify client creation (#51061)
* Use contextual middleware and simplify client creation * Fix tests * Add test for the header propagation * Fix tests and lint * Update pkg/tsdb/prometheus/prometheus.go Co-authored-by: ismail simsek <ismailsimsek09@gmail.com> Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
This commit is contained in:
co-authored by
ismail simsek
parent
a8eb29f1d7
commit
d20afa2a39
@@ -136,8 +136,9 @@ func runQuery(response []byte, query PrometheusQuery) (*backend.QueryDataRespons
|
||||
tracer: tracer,
|
||||
TimeInterval: "15s",
|
||||
log: &fakeLogger{},
|
||||
client: api,
|
||||
}
|
||||
return s.runQueries(context.Background(), api, []*PrometheusQuery{&query})
|
||||
return s.runQueries(context.Background(), []*PrometheusQuery{&query})
|
||||
}
|
||||
|
||||
type fakeLogger struct {
|
||||
|
||||
Reference in New Issue
Block a user