mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 20:59:35 +08:00
Alerting: Add details to the payload when tracking import to GMA (#106404)
add details to the payload when tracking import to GMA
This commit is contained in:
@ -229,7 +229,14 @@ export const trackDeletedRuleRestoreFail = async () => {
|
|||||||
reportInteraction('grafana_alerting_deleted_rule_restore_error');
|
reportInteraction('grafana_alerting_deleted_rule_restore_error');
|
||||||
};
|
};
|
||||||
|
|
||||||
export const trackImportToGMASuccess = async (payload: { importSource: 'yaml' | 'datasource' }) => {
|
export const trackImportToGMASuccess = async (payload: {
|
||||||
|
importSource: 'yaml' | 'datasource';
|
||||||
|
isRootFolder: boolean;
|
||||||
|
namespace?: string;
|
||||||
|
ruleGroup?: string;
|
||||||
|
pauseRecordingRules: boolean;
|
||||||
|
pauseAlertingRules: boolean;
|
||||||
|
}) => {
|
||||||
reportInteraction('grafana_alerting_import_to_gma_success', { ...payload });
|
reportInteraction('grafana_alerting_import_to_gma_success', { ...payload });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -152,7 +152,14 @@ export const ConfirmConversionModal = ({ importPayload, isOpen, onDismiss }: Mod
|
|||||||
|
|
||||||
const isRootFolder = isEmpty(targetFolder?.uid);
|
const isRootFolder = isEmpty(targetFolder?.uid);
|
||||||
|
|
||||||
trackImportToGMASuccess({ importSource });
|
trackImportToGMASuccess({
|
||||||
|
importSource,
|
||||||
|
isRootFolder,
|
||||||
|
namespace,
|
||||||
|
ruleGroup,
|
||||||
|
pauseRecordingRules,
|
||||||
|
pauseAlertingRules,
|
||||||
|
});
|
||||||
const ruleListUrl = createListFilterLink(isRootFolder ? [] : [['namespace', targetFolder?.title ?? '']], {
|
const ruleListUrl = createListFilterLink(isRootFolder ? [] : [['namespace', targetFolder?.title ?? '']], {
|
||||||
skipSubPath: true,
|
skipSubPath: true,
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user