Commit 4aa09a6a by Agnès Toulet Committed by GitHub

Analytics: add data source type in data-request events (#30087)

parent aa2acd0c
......@@ -175,6 +175,11 @@ export abstract class DataSourceApi<
readonly id: number;
/**
* Set in constructor
*/
readonly type: string;
/**
* min interval range
*/
interval?: string;
......@@ -182,6 +187,7 @@ export abstract class DataSourceApi<
constructor(instanceSettings: DataSourceInstanceSettings<TOptions>) {
this.name = instanceSettings.name;
this.id = instanceSettings.id;
this.type = instanceSettings.type;
this.meta = {} as DataSourcePluginMeta;
}
......
......@@ -20,7 +20,8 @@ export interface DashboardInfo {
*/
export interface DataRequestInfo extends Partial<DashboardInfo> {
datasourceName: string;
datasourceId?: number;
datasourceId: number;
datasourceType: string;
panelId?: number;
panelName?: string;
duration: number;
......
......@@ -23,6 +23,7 @@ export function emitDataRequestEvent(datasource: DataSourceApi) {
eventName: MetaAnalyticsEventName.DataRequest,
datasourceName: datasource.name,
datasourceId: datasource.id,
datasourceType: datasource.type,
panelId: data.request.panelId,
dashboardId: data.request.dashboardId,
dataSize: 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment