diff --git a/src/SelfServe/SelfServeComponent.tsx b/src/SelfServe/SelfServeComponent.tsx index c9ddc9371..41ae52e02 100644 --- a/src/SelfServe/SelfServeComponent.tsx +++ b/src/SelfServe/SelfServeComponent.tsx @@ -17,6 +17,8 @@ import * as _ from "underscore"; import { sendMessage } from "../Common/MessageHandler"; import { SelfServeMessageTypes } from "../Contracts/SelfServeContracts"; import { SmartUiComponent, SmartUiDescriptor } from "../Explorer/Controls/SmartUi/SmartUiComponent"; +import { Action, ActionModifiers } from "../Shared/Telemetry/TelemetryConstants"; +import { trace } from "../Shared/Telemetry/TelemetryProcessor"; import { commandBarItemStyles, commandBarStyles, containerStackTokens, separatorStyles } from "./SelfServeStyles"; import { AnyDisplay, @@ -27,6 +29,7 @@ import { Node, NumberInput, RefreshResult, + SelfServeComponentTelemetryType, SelfServeDescriptor, SmartUiInput, StringInput, @@ -87,6 +90,12 @@ export class SelfServeComponent extends React.Component => { + const telemetryData = { + selfServeClassName: this.props.descriptor.root.id, + eventType: SelfServeComponentTelemetryType.Save, + }; + trace(Action.SelfServeComponent, ActionModifiers.Mark, telemetryData, SelfServeMessageTypes.TelemetryInfo); + this.setState({ isSaving: true, notification: undefined }); try { const onSaveResult = await this.props.descriptor.onSave( diff --git a/src/SelfServe/SelfServeTypes.ts b/src/SelfServe/SelfServeTypes.ts index 0428d663d..d6c96e031 100644 --- a/src/SelfServe/SelfServeTypes.ts +++ b/src/SelfServe/SelfServeTypes.ts @@ -70,6 +70,12 @@ export interface SelfServeDescriptor { refreshParams?: RefreshParams; } +/**@internal */ +export enum SelfServeComponentTelemetryType { + Load = "Load", + Save = "Save", +} + /**@internal */ export type AnyDisplay = NumberInput | BooleanInput | StringInput | ChoiceInput | DescriptionDisplay; diff --git a/src/Shared/Telemetry/TelemetryConstants.ts b/src/Shared/Telemetry/TelemetryConstants.ts index 058937df9..134340ad4 100644 --- a/src/Shared/Telemetry/TelemetryConstants.ts +++ b/src/Shared/Telemetry/TelemetryConstants.ts @@ -117,6 +117,7 @@ export enum Action { SelfServe, ExpandAddCollectionPaneAdvancedSection, SchemaAnalyzerClickAnalyze, + SelfServeComponent, } export const ActionModifiers = {