refactor: remove correlations from query analytics

This commit is contained in:
Laura Benz 2023-01-10 14:29:44 +01:00
parent a45b83fae3
commit 499732714c

View File

@ -32,9 +32,9 @@ export function emitDataRequestEvent(datasource: DataSourceApi) {
duration: data.request.endTime! - data.request.startTime,
};
if (data.request.app === CoreApp.Explore || data.request.app === CoreApp.Correlations) {
enrichWithInfo(eventData, data);
} else {
if (data.request.app === CoreApp.Explore) {
enrichWithExploreInfo(eventData, data);
} else if (data.request.app === CoreApp.Dashboard) {
enrichWithDashboardInfo(eventData, data);
}
@ -50,7 +50,7 @@ export function emitDataRequestEvent(datasource: DataSourceApi) {
done = true;
};
function enrichWithInfo(eventData: DataRequestEventPayload, data: PanelData) {
function enrichWithExploreInfo(eventData: DataRequestEventPayload, data: PanelData) {
const totalQueries = Object.keys(data.series).length;
eventData.totalQueries = totalQueries;
}