@@ -9,9 +9,37 @@ export interface TelemetryEventMeasurements {
9
9
readonly [ key : string ] : number ;
10
10
}
11
11
export default class TelemetryReporter {
12
+ /**
13
+ * @param extensionId The id of your extension
14
+ * @param extensionVersion The version of your extension
15
+ * @param key The app insights key
16
+ * @param firstParty Whether or not the telemetry is first party (i.e from Microsoft / GitHub)
17
+ */
12
18
constructor ( extensionId : string , extensionVersion : string , key : string , firstParty ?: boolean ) ;
19
+
20
+ /**
21
+ * Sends a telemetry event with the given properties and measurements
22
+ * @param eventName The name of the event
23
+ * @param properties The set of properties to add to the event in the form of a string key value pair
24
+ * @param measurements The set of measurements to add to the event in the form of a string key number value pair
25
+ */
13
26
sendTelemetryEvent ( eventName : string , properties ?: TelemetryEventProperties , measurements ?: TelemetryEventMeasurements ) : void ;
27
+
28
+ /**
29
+ * Sends a telemetry error event with the given properties, measurements, and errorProps
30
+ * @param eventName The name of the event
31
+ * @param properties The set of properties to add to the event in the form of a string key value pair
32
+ * @param measurements The set of measurements to add to the event in the form of a string key number value pair
33
+ * @param errorProps A list of case sensitive properties to drop, if excluded we drop all properties but still send the event
34
+ */
14
35
sendTelemetryErrorEvent ( eventName : string , properties ?: TelemetryEventProperties , measurements ?: TelemetryEventMeasurements , errorProps ?: string [ ] ) : void ;
36
+
37
+ /**
38
+ * Sends an exception which includes the error stack, properties, and measurements
39
+ * @param error The error to send
40
+ * @param properties The set of properties to add to the event in the form of a string key value pair
41
+ * @param measurements The set of measurements to add to the event in the form of a string key number value pair
42
+ */
15
43
sendTelemetryException ( error : Error , properties ?: TelemetryEventProperties , measurements ?: TelemetryEventMeasurements ) : void ;
16
44
dispose ( ) : Promise < any > ;
17
45
}
0 commit comments