Files
Jack Westbrook 6822805c32 Grafana Runtime: Use package.json exports for internal code (#102100)
* refactor(frontend): update runtime import paths for grafana/runtime/src -> grafana/runtime

* feat(runtime): introduce internal api entrypoint and exports property

* refactor(frontend): update runtime imports to use internal entrypoint

* chore(betterer): update results file

* refactor(bookmarks): update runtime/unstable import

* chore(betterer): update results file

* test(frontend): fix failing tests due to mocking nested runtime imports

* test(datasourcesrv): fix failing tests due to mocks

* chore(alerting): clean up redundant import

* fix(packages): fix default require export pointing to types declaration file

* docs(packages): update readme related to exports

* chore(internationalization): fix import paths

* chore(betterer): update results file
2025-03-27 08:59:57 +01:00

21 lines
734 B
TypeScript

import { reportInteraction } from '@grafana/runtime';
export enum IRMInteractionNames {
ViewIRMMainPage = 'grafana_irm_configuration_tracker_main_page_view',
OpenEssentials = 'grafana_irm_configuration_tracker_essentials_open',
CloseEssentials = 'grafana_irm_configuration_tracker_essentials_closed',
ClickDataSources = 'grafana_irm_configuration_tracker_data_sources_clicked',
}
export interface ConfigurationTrackerContext {
essentialStepsDone: number;
essentialStepsToDo: number;
dataSourceCompatibleWithAlerting: boolean;
}
export function trackIrmConfigurationTrackerEvent(
interactionName: IRMInteractionNames,
payload: ConfigurationTrackerContext
) {
reportInteraction(interactionName, { ...payload });
}