mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 02:26:04 +00:00
Disable telemetry when in extension testing enviornment
This commit is contained in:
parent
6b4ccf3141
commit
dbe529d01e
|
@ -98,17 +98,17 @@ export function configurationTelemetry(telemetryService: ITelemetryService, conf
|
|||
}
|
||||
|
||||
/**
|
||||
* Determines how telemetry is handled based on the current running configuration.
|
||||
* To log telemetry locally, the client must not disable telemetry via the CLI
|
||||
* If client is a built product and telemetry is enabled via the product.json, telemetry is supported
|
||||
* This function is only used to determine if telemetry contructs should occur, but is not impacted by user configuration
|
||||
*
|
||||
* Determines whether or not we support logging telemetry.
|
||||
* This checks if the product is capable of collecting telemetry but not whether or not it can send it
|
||||
* For checking the user setting and what telemetry you can send please check `getTelemetryLevel`.
|
||||
* This returns true if `--disable-telemetry` wasn't used, the product.json allows for telemetry, and we're not testing an extension
|
||||
* If false telemetry is disabled throughout the product
|
||||
* @param productService
|
||||
* @param environmentService
|
||||
* @returns false - telemetry is completely disabled, true - telemetry is logged locally, but may not be sent
|
||||
*/
|
||||
export function supportsTelemetry(productService: IProductService, environmentService: IEnvironmentService): boolean {
|
||||
return !(environmentService.disableTelemetry || !productService.enableTelemetry);
|
||||
return !(environmentService.disableTelemetry || !productService.enableTelemetry || environmentService.extensionTestsLocationURI);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue