Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gbockus-sf committed Sep 20, 2024
1 parent aeaec10 commit c7aa878
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions contributing/telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

Similar to what vscode does, we are reporting on certain events that happen in the extensions in order to provide visibility on its usage.

## How it works

All extensions leverage the telemetryService in `salesforce-vscode-core` extension in order to send data.

## Disabling Telemetry
There are several ways to disable telemetry for all Salesforce extensions.
- Turn off the Core Extension telemetry setting at the workspace level `("salesforcedx-vscode-core.telemetry.enabled": false)`
- Disable SF CLI telemetry
- `sf config set disable-telemetry=true --global`

*Note* for developers that are employed by Salesforce telemetry can not be disabled.

## Adding telemetry to an extension

- Add [vscode-extension-telemetry](https://github.com/Microsoft/vscode-extension-telemetry#readme) as a devDependency
Expand All @@ -22,7 +21,21 @@ There are several ways to disable telemetry for all Salesforce extensions.
## Logging telemetry to a file
Often it is useful to be able to validate values being sent to telemetry without having to look into where the telemetry is reported.

For both local development and VSIX builds you can enable local telemetry logging by setting two environment variables
For both local development and VSIX builds you can enable local telemetry logging

### Dev Mode
When running the extension in dev mode you can enable local logging by setting the following advanced setting
```
"salesforcedx-vscode-apex.advanced": {
"localTelemetryLogging": "true"
},
```

Advanced settings can be access via the advanced settings link found in the settings UI for the Extension.

### VSIX/Production Mode
When running extensions installed through the marketplace or directly from VSIX file you can enable local logging by setting the
following environment variables.

```
"VSCODE_LOG_LEVEL": "trace",
Expand Down

0 comments on commit c7aa878

Please sign in to comment.