UNPKG

@microsoft/compose-language-service

Version:
51 lines (50 loc) 1.81 kB
/*!-------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------*/ export interface TelemetryEvent { /** * The event name. */ eventName: string; /** * Properties of the event. Successful events will be aggregated, and each property from each event attached to the ultimate aggregated event. * It is recommended in most cases to sort array properties, in order for them to be functionally treated as sets rather than arrays. */ properties: TelemetryProperties; /** * Duration measurements for the event */ measurements: TelemetryMeasurements & AggregateTelemetryMeasurements; /** * How the events will be grouped, either by name only, or name + JSON.stringify(properties) */ groupingStrategy: 'eventName' | 'eventNameAndProperties'; /** * If true, the event will not be sent if it is successful. */ suppressIfSuccessful?: boolean; /** * If true, the event will not be sent. */ suppressAll?: boolean; } interface TelemetryProperties { isActivationEvent: 'true' | 'false'; result: 'Succeeded' | 'Failed' | 'Canceled'; error?: string; errorMessage?: string; stack?: string; [key: string]: string | undefined; } interface TelemetryMeasurements { duration?: number; } interface AggregateTelemetryMeasurements { count?: number; durationMu?: number; durationSigma?: number; durationMedian?: number; } export declare function initEvent(eventName: string): TelemetryEvent; export {};