Hi Guys,
I have a question about loki query range retry config, when the grafana UI called loki query range, if there is 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. Do anyone knows 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 -
) -
) -
); -
};