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
+15
View File
@@ -171,6 +171,21 @@ You can open showcase issues for the following things:
- Share an article/video/webcast/... that explains how you use Front Matter;
- Got something else to share? Open an issue and we can see where it fits on our website.
## 📊 Telemetry
The Front Matter CMS extension collects telemetry data to help us build a better understand which features from the CMS are used. The extension respects the `telemetry.enableTelemetry` setting which you can learn more about in the [Visual Studio Code FAQ](https://aka.ms/vscode-remote/telemetry), or you can only disable it for the extension by configuring the `frontMatter.telemetry.disable` setting.
We only collect the following data:
- Type of event
- Extension title (main or beta)
- Extension version
No user-specific data is collected, you can check the telemetry implementation in the following files:
- [Telemetry class](https://github.com/estruyf/vscode-front-matter/blob/59528a3db01be8d34dc40638e6cf827090e31986/src/helpers/Telemetry.ts)
- [Metrics API](https://github.com/FrontMatter/web-documentation-nextjs/blob/main/pages/api/metrics.ts)
## 👉 Contributors 🤘
<p align="center">
+15
View File
@@ -169,6 +169,21 @@ You can open showcase issues for the following things:
- Share an article/video/webcast/... that explains how you use Front Matter;
- Got something else to share? Open an issue and we can see where it fits on our website.
## 📊 Telemetry
The Front Matter CMS extension collects telemetry data to help us build a better understand which features from the CMS are used. The extension respects the `telemetry.enableTelemetry` setting which you can learn more about in the [Visual Studio Code FAQ](https://aka.ms/vscode-remote/telemetry), or you can only disable it for the extension by configuring the `frontMatter.telemetry.disable` setting.
We only collect the following data:
- Type of event
- Extension title (main or beta)
- Extension version
No user-specific data is collected, you can check the telemetry implementation in the following files:
- [Telemetry class](https://github.com/estruyf/vscode-front-matter/blob/59528a3db01be8d34dc40638e6cf827090e31986/src/helpers/Telemetry.ts)
- [Metrics API](https://github.com/FrontMatter/web-documentation-nextjs/blob/main/pages/api/metrics.ts)
## 👉 Contributors 🤘
<p align="center">
+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;
}