Loki: Rename the hint header (#42205) (#42212)

X-Query-Tag -> X-Query-Tags (https://github.com/grafana/grafana/pull/42108#discussion_r755776672)

(cherry picked from commit 10f844e3ad)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2021-11-24 13:06:48 +01:00
committed by GitHub
co-authored by Piotr Jamróz
parent df6223024f
commit 1a80ea3b05
2 changed files with 3 additions and 3 deletions
@@ -188,7 +188,7 @@ describe('LokiDatasource', () => {
expect(backendSrv.fetch).toBeCalledWith(
expect.objectContaining({
headers: {
'X-Query-Tag': 'Source=logvolhist',
'X-Query-Tags': 'Source=logvolhist',
},
})
);
@@ -200,7 +200,7 @@ describe('LokiDatasource', () => {
expect(backendSrv.fetch).not.toBeCalledWith(
expect.objectContaining({
headers: {
'X-Query-Tag': 'Source=logvolhist',
'X-Query-Tags': 'Source=logvolhist',
},
})
);
@@ -281,7 +281,7 @@ export class LokiDatasource
}
const query = this.createRangeQuery(target, options, maxDataPoints);
const headers = target.volumeQuery ? { 'X-Query-Tag': 'Source=logvolhist' } : undefined;
const headers = target.volumeQuery ? { 'X-Query-Tags': 'Source=logvolhist' } : undefined;
return this._request(RANGE_QUERY_ENDPOINT, query, { headers }).pipe(
catchError((err) => throwError(() => this.processError(err, target))),