diff --git a/contributing/telemetry.md b/contributing/telemetry.md index 482e41aa98..f385bb0f5e 100644 --- a/contributing/telemetry.md +++ b/contributing/telemetry.md @@ -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 @@ -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",