Skip to content

feat: Enable code suggestions telemetry in browser environment (Web IDE)

Enrique Alcántara requested to merge setup-telemetry-in-browser-environment into main

What does this MR do?

It sets up Snowplow for Code Suggestions in the Web IDE. We need a separate initializer function because the Web IDE disables telemetry globally. See https://gitlab.com/gitlab-org/gitlab-web-ide/-/issues/277 for a detailed discussion (internal issue).

How to test?

diff --git a/src/common/snowplow/snowplow_options.ts b/src/common/snowplow/snowplow_options.ts
index c0b43b9c..1d24ac13 100644
--- a/src/common/snowplow/snowplow_options.ts
+++ b/src/common/snowplow/snowplow_options.ts
@@ -10,7 +10,7 @@ export type SnowplowOptions = {
export const snowplowBaseOptions: Omit<SnowplowOptions, 'enabled'> = {
appId: 'gitlab_ide_extension',
-  endpoint: 'https://snowplow.trx.gitlab.net',
+  endpoint: 'http://localhost:9091',
timeInterval: 5000,
-  maxItems: 10,
+  maxItems: 1,
};
  • Use the code suggestions feature in the Web IDE. Check the web browser's network inspector for snowplow HTTP requests.
Edited by Enrique Alcántara

Merge request reports