Skip to content

Commit e55b109

Browse files
committed
Update .d.ts
1 parent 8c7b1f5 commit e55b109

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

lib/telemetryReporter.d.ts

+28
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,37 @@ export interface TelemetryEventMeasurements {
99
readonly [key: string]: number;
1010
}
1111
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+
*/
1218
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+
*/
1326
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+
*/
1435
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+
*/
1543
sendTelemetryException(error: Error, properties?: TelemetryEventProperties, measurements?: TelemetryEventMeasurements): void;
1644
dispose(): Promise<any>;
1745
}

0 commit comments

Comments
 (0)