mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
refactor: remove correlations from query analytics
This commit is contained in:
parent
a45b83fae3
commit
499732714c
@ -32,9 +32,9 @@ export function emitDataRequestEvent(datasource: DataSourceApi) {
|
|||||||
duration: data.request.endTime! - data.request.startTime,
|
duration: data.request.endTime! - data.request.startTime,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.request.app === CoreApp.Explore || data.request.app === CoreApp.Correlations) {
|
if (data.request.app === CoreApp.Explore) {
|
||||||
enrichWithInfo(eventData, data);
|
enrichWithExploreInfo(eventData, data);
|
||||||
} else {
|
} else if (data.request.app === CoreApp.Dashboard) {
|
||||||
enrichWithDashboardInfo(eventData, data);
|
enrichWithDashboardInfo(eventData, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ export function emitDataRequestEvent(datasource: DataSourceApi) {
|
|||||||
done = true;
|
done = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
function enrichWithInfo(eventData: DataRequestEventPayload, data: PanelData) {
|
function enrichWithExploreInfo(eventData: DataRequestEventPayload, data: PanelData) {
|
||||||
const totalQueries = Object.keys(data.series).length;
|
const totalQueries = Object.keys(data.series).length;
|
||||||
eventData.totalQueries = totalQueries;
|
eventData.totalQueries = totalQueries;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user