You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the user does not specify an event name or properties, pick an informative and descriptive name for the telemetry event based on the task or feature. Add properties as you see fit to collect the necessary information to achieve the telemetry goal, ensuring they are relevant and useful for diagnostics or analytics.
6
+
7
+
When adding telemetry:
8
+
9
+
- If the user wants to record when an action is started (such as a command invocation), place the telemetry call at the start of the handler or function.
10
+
- If the user wants to record successful completions or outcomes, place the telemetry call at the end of the action, after the operation has succeeded (and optionally, record errors or failures as well).
11
+
12
+
Instructions to add a new telemetry event:
13
+
14
+
1. Add a new event name to the `EventNames` enum in `src/common/telemetry/constants.ts`.
15
+
2. Add a corresponding entry to the `IEventNamePropertyMapping` interface in the same file, including a GDPR comment and the expected properties.
16
+
3. In the relevant code location, call `sendTelemetryEvent` with the new event name and required properties. Example:
17
+
```typescript
18
+
sendTelemetryEvent(EventNames.YOUR_EVENT_NAME, undefined, { property: value });
0 commit comments