mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-05 17:31:22 +02:00
Added telemetry information
This commit is contained in:
@@ -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.`
|
||||
];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user