Log Context: Add feature tracking (#66912)

add feature tracking
This commit is contained in:
Sven Grossmann
2023-04-20 15:42:44 +02:00
committed by GitHub
parent 35342a3c76
commit c903d1546f
2 changed files with 19 additions and 1 deletions

View File

@ -14,7 +14,7 @@ import {
SelectableValue,
rangeUtil,
} from '@grafana/data';
import { config } from '@grafana/runtime';
import { config, reportInteraction } from '@grafana/runtime';
import { DataQuery, TimeZone } from '@grafana/schema';
import { Icon, Button, LoadingBar, Modal, useTheme2 } from '@grafana/ui';
import { dataFrameToLogsModel } from 'app/core/logsModel';
@ -342,6 +342,12 @@ export const LogRowContextModal: React.FunctionComponent<LogRowContextModalProps
title="We recently reworked the Log Context UI, please let us know how we can further improve it."
target="_blank"
rel="noreferrer noopener"
onClick={() => {
reportInteraction('grafana_explore_logs_log_context_give_feedback_clicked', {
datasourceType: row.datasourceType,
logRowUid: row.uid,
});
}}
>
<Icon name="comment-alt-message" /> Give feedback
</a>
@ -357,6 +363,10 @@ export const LogRowContextModal: React.FunctionComponent<LogRowContextModalProps
})
);
onClose();
reportInteraction('grafana_explore_logs_log_context_open_split_view_clicked', {
datasourceType: row.datasourceType,
logRowUid: row.uid,
});
}}
>
Open in split view