sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.76k stars 298 forks source link

bug: v2 telemetry for Cody installations not being fired #3825

Open dadlerj opened 7 months ago

dadlerj commented 7 months ago

Version

Current/all

Describe the bug

The v2 cody.extension / installed event seems to ~~ never be logged (we have tens of thousands of cody.extension / savedLogin events fired per day, but single digit cody.extension / installed ones: https://sourcegraph.sourcegraph.com/github.com/sourcegraph/cody/-/blob/vscode/src/services/telemetry-v2.ts?L139

One of the two parameters in the conditional must be incorrectly set.

Expected behavior

New installations should fire the event as expected

Additional context

Slack discussion

akalia25 commented 6 months ago

In case this is helpful, you can identify this bug on the e2e tests (i.e.vscode/test/e2e/auth.test.ts). Below is a screenshot of v1 events and v2 events fired on the auth.test.

image

to view v2 telemetry events, you can export loggedV2Events on vscode/test/fixtures/mock-server.ts and import that on the test, and do a console.log.

kelsey-brown commented 5 months ago

@chenkc805 any chance we could get this prioritized for the next week or two? We're currently using the V1 install event for all our install related metrics as a backup, but with the news that we're going to turn off V1 events on Wednesday, I'd love to be able to rely on V2 data for installs