mirror of
https://github.com/apache/superset.git
synced 2026-04-26 19:44:58 +00:00
[logging] add selected tab name into perf logging (#10080)
This commit is contained in:
@@ -68,7 +68,12 @@ const loggerMiddleware = store => next => action => {
|
||||
return next(action);
|
||||
}
|
||||
|
||||
const { dashboardInfo, explore, impressionId } = store.getState();
|
||||
const {
|
||||
dashboardInfo,
|
||||
explore,
|
||||
impressionId,
|
||||
dashboardLayout,
|
||||
} = store.getState();
|
||||
let logMetadata = {
|
||||
impression_id: impressionId,
|
||||
version: 'v2',
|
||||
@@ -111,6 +116,12 @@ const loggerMiddleware = store => next => action => {
|
||||
};
|
||||
}
|
||||
|
||||
if (eventData.target_id && dashboardLayout.present) {
|
||||
const meta = dashboardLayout.present[eventData.target_id].meta;
|
||||
// chart name or tab/header text
|
||||
eventData.target_name = meta.chartId ? meta.sliceName : meta.text;
|
||||
}
|
||||
|
||||
logMessageQueue.append(eventData);
|
||||
return eventData;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user