refactor(telemetry): Instrument telemetry to track code suggestion lifecycle
MR adds tracking to code suggestion lifecycle as requested by https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/issues/256
To test locally:
- configure snowplow micro following https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/snowplow_micro.md
- change snowplow configuration to report to your local collector
diff --git a/src/common/setup_telemetry.ts b/src/common/setup_telemetry.ts
index b82d1ed..05173aa 100644
--- a/src/common/setup_telemetry.ts
+++ b/src/common/setup_telemetry.ts
@@ -9,9 +9,9 @@ export function setupTelemetry(): Snowplow {
const snowplow = Snowplow.getInstance({
appId: 'gitlab_ide_extension',
- endpoint: 'https://snowplow.trx.gitlab.net',
+ endpoint: 'http://localhost:9091',
timeInterval: 5000,
- maxItems: 10,
+ maxItems: 1,
enabled: () => isTelemetryEnabled,
});
Edited by Mikołaj Wawrzyniak