Added telemetry information

This commit is contained in:
Elio Struyf
2024-02-26 15:13:08 +01:00
parent 59528a3db0
commit 003d93b0f2
4 changed files with 37 additions and 2 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
export const SentryIgnore = [
`ResizeObserver loop limit exceeded`,
`Cannot read properties of undefined (reading 'unobserve')`,
`TypeError: Cannot read properties of undefined (reading 'unobserve')`
`TypeError: Cannot read properties of undefined (reading 'unobserve')`,
`ResizeObserver loop completed with undelivered notifications.`
];
+5 -1
View File
@@ -1,3 +1,4 @@
import { workspace } from 'vscode';
import { Extension, Settings } from '.';
import { EXTENSION_BETA_ID, EXTENSION_ID, SETTING_TELEMETRY_DISABLE } from '../constants';
@@ -30,8 +31,11 @@ export class Telemetry {
* @returns
*/
public static send(eventName: string, properties?: any) {
const config = workspace.getConfiguration('telemetry');
const isVscodeEnable = config.get<'off' | undefined>('enableTelemetry');
const isDisabled = Settings.get<boolean>(SETTING_TELEMETRY_DISABLE);
if (isDisabled) {
if (isDisabled || isVscodeEnable === 'off') {
return;
}