grafana/public/app/plugins/datasource/cloud-monitoring/tracking.ts
Andrew Hackmann 42f4306251
Google Cloud Monitor: Prom query editor (#73503)
* revert

* works but needs clean up and tests

* clean up

* remove any

* change confusing query var to expr

* oops

* add test

* lint

* cleanup

* update docs

* Update public/app/plugins/datasource/cloud-monitoring/components/PromQLEditor.tsx

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* nit

* lint fix?

* remove comment from cue

* go linter

* removing parsing stuff parseresponse func

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-08-18 11:14:43 -05:00

26 lines
1.0 KiB
TypeScript

import { reportInteraction } from '@grafana/runtime';
/**
* Loaded the first time a dashboard containing Cloudmonitoring queries is loaded (not on every render)
* Note: The queries used here are the ones pre-migration and pre-filterQuery
*/
export const trackCloudMonitoringDashboardLoaded = (props: CloudMonitoringDashboardLoadedProps) => {
reportInteraction('grafana_ds_cloudmonitoring_dashboard_loaded', props);
};
export type CloudMonitoringDashboardLoadedProps = {
grafana_version?: string;
dashboard_id: string;
org_id?: number;
/** number of non hidden queries of type TimeSeriesQuery (MQL) if any */
mql_queries: number;
/** number of non hidden queries of type TimeSeriesFilter (Builder) if any */
time_series_filter_queries: number;
/** number of non hidden queries of type SLO if any */
slo_queries: number;
/** number of non hidden queries of type annotation if any */
annotation_queries: number;
/** number of non hidden queries of type PromQL if any */
promQL_queries: number;
};