Hi Guys,
I have a question about Loki query range retry config, when the grafana UI called Loki query range API if there is an HTTP error like 500, Loki query range API have a retry mechanism, we want to set the retry times to 2.
You could see the retry: 2 below, but it doesn’t work. Does anyone know the reason why?
Code:
const queryOptions = { ...options, maxDataPoints: linesLimit, retry: 2 };
if ((options as DataQueryRequest<LokiQuery>).liveStreaming) {
return this.runLiveQuery(target, queryOptions);
}
const query = this.createRangeQuery(target, queryOptions);
return this._request(RANGE_QUERY_ENDPOINT, query).pipe(
catchError((err: any) => this.throwUnless(err, err.status === 404, target)),
switchMap((response: { data: LokiResponse; status: number }) =>
processRangeQueryResponse(
response.data,
target,
query,
responseListLength,
linesLimit,
this.instanceSettings.jsonData,
(options as DataQueryRequest<LokiQuery>).scopedVars,
(options as DataQueryRequest<LokiQuery>).reverse
)
)
);
};