Skip to content

Commit

Permalink
feat(participant): Report telemetry for welcome VSCODE-602 (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev authored Sep 19, 2024
1 parent 01486e4 commit b37272f
Show file tree
Hide file tree
Showing 3 changed files with 258 additions and 292 deletions.
12 changes: 10 additions & 2 deletions src/participant/participant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ import { getSimplifiedSampleDocuments } from './sampleDocuments';
import { getCopilotModel } from './model';
import { createMarkdownLink } from './markdown';
import { ChatMetadataStore } from './chatMetadata';
import { chatResultFeedbackKindToTelemetryValue } from '../telemetry/telemetryService';
import {
chatResultFeedbackKindToTelemetryValue,
TelemetryEventTypes,
} from '../telemetry/telemetryService';
import type TelemetryService from '../telemetry/telemetryService';

const log = createLogger('participant');
Expand Down Expand Up @@ -775,7 +778,12 @@ export default class ParticipantController {
Interact with your MongoDB clusters and generate MongoDB-related code more efficiently with intelligent AI-powered feature, available today in the MongoDB extension.\n\n
Please see our [FAQ](https://www.mongodb.com/docs/generative-ai-faq/) for more information.\n\n`)
);
void this._storageController.update(

this._telemetryService.track(
TelemetryEventTypes.PARTICIPANT_WELCOME_SHOWN
);

await this._storageController.update(
StorageVariables.COPILOT_HAS_BEEN_SHOWN_WELCOME_MESSAGE,
true
);
Expand Down
1 change: 1 addition & 0 deletions src/telemetry/telemetryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export enum TelemetryEventTypes {
SURVEY_CLICKED = 'Survey link clicked',
SURVEY_DISMISSED = 'Survey prompt dismissed',
PARTICIPANT_FEEDBACK = 'Participant Feedback',
PARTICIPANT_WELCOME_SHOWN = 'Participant Welcome Shown',
}

/**
Expand Down
Loading

0 comments on commit b37272f

Please sign in to comment.