mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
[prometheus] Use panelId and target.refId for requestId
Using these two values ties requests to a particular query position within a panel, ensuring that requests are canceled if: - Duplicate requests with the same query are sent - Requests from the same query position (but a different query) are sent The last point is important as it identifies queries by a physical location in the dashboard instead of with the query expression. If a different query from the same position in a panel is sent, the previous request should be canceled.
This commit is contained in:
committed by
Torkel Ödegaard
parent
65683ab241
commit
eb35f8cb89
@@ -77,7 +77,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
|
||||
|
||||
var query: any = {};
|
||||
query.expr = templateSrv.replace(target.expr, options.scopedVars, self.interpolateQueryExpr);
|
||||
query.requestId = target.expr;
|
||||
query.requestId = options.panelId + target.refId;
|
||||
|
||||
var interval = target.interval || options.interval;
|
||||
var intervalFactor = target.intervalFactor || 1;
|
||||
|
||||
Reference in New Issue
Block a user