From be08685e3f9e3189eaca0b548faf9de2fd150ebd Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Thu, 4 Mar 2021 21:00:15 +0100 Subject: [PATCH] Tempo: set authentication header properly (#31699) (#31701) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 53d4acdad2985aa31cc72da1bb8f2cc2fb372574) Co-authored-by: Zoltán Bedi --- pkg/tsdb/tempo/tempo.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/tsdb/tempo/tempo.go b/pkg/tsdb/tempo/tempo.go index f647f18bc8f..7f77c1e3f9f 100644 --- a/pkg/tsdb/tempo/tempo.go +++ b/pkg/tsdb/tempo/tempo.go @@ -60,6 +60,10 @@ func (e *tempoExecutor) Query(ctx context.Context, dsInfo *models.DataSource, ts return nil, err } + if dsInfo.BasicAuth { + req.SetBasicAuth(dsInfo.BasicAuthUser, dsInfo.DecryptedBasicAuthPassword()) + } + req.Header.Set("Accept", "application/protobuf") resp, err := e.httpClient.Do(req)