Skip to content

Commit 309e3f2

Browse files
committed
Moves the mcp registration completed event to global telemetry
1 parent b34622b commit 309e3f2

File tree

3 files changed

+7
-23
lines changed

3 files changed

+7
-23
lines changed

docs/telemetry-events.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
'global.enabled': boolean,
3434
'global.folders.count': number,
3535
'global.folders.schemes': string,
36+
'global.gk.mcp.registrationCompleted': boolean,
3637
'global.install': boolean,
3738
'global.prerelease': boolean,
3839
'global.providers.count': number,
@@ -2764,18 +2765,6 @@ void
27642765
}
27652766
```
27662767

2767-
### mcp/registration/completed
2768-
2769-
> Sent when GitKraken MCP registration is completed
2770-
2771-
```typescript
2772-
{
2773-
'cli.version': string,
2774-
'requiresUserCompletion': boolean,
2775-
'source': 'account' | 'subscription' | 'graph' | 'composer' | 'patchDetails' | 'settings' | 'timeline' | 'home' | 'ai' | 'ai:markdown-preview' | 'ai:markdown-editor' | 'ai:picker' | 'associateIssueWithBranch' | 'cloud-patches' | 'code-suggest' | 'commandPalette' | 'deeplink' | 'editor:hover' | 'feature-badge' | 'feature-gate' | 'gk-cli-integration' | 'gk-mcp-provider' | 'inspect' | 'inspect-overview' | 'integrations' | 'launchpad' | 'launchpad-indicator' | 'launchpad-view' | 'mcp' | 'mcp-welcome-message' | 'merge-target' | 'notification' | 'prompt' | 'quick-wizard' | 'rebaseEditor' | 'remoteProvider' | 'scm' | 'scm-input' | 'startWork' | 'trial-indicator' | 'view' | 'walkthrough' | 'whatsnew' | 'worktrees'
2776-
}
2777-
```
2778-
27792768
### mcp/registration/failed
27802769

27812770
> Sent when GitKraken MCP registration fails

src/constants.telemetry.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export interface TelemetryGlobalContext extends SubscriptionEventData {
3636
upgradedFrom: string | undefined;
3737
'folders.count': number;
3838
'folders.schemes': string;
39+
'gk.mcp.registrationCompleted': boolean;
3940
'providers.count': number;
4041
'providers.ids': string;
4142
'repositories.count': number;
@@ -251,8 +252,6 @@ export interface TelemetryEvents extends WebviewShowAbortedEvents, WebviewShownE
251252
'mcp/setup/completed': MCPSetupCompletedEvent;
252253
/** Sent when GitKraken MCP setup fails */
253254
'mcp/setup/failed': MCPSetupFailedEvent;
254-
/** Sent when GitKraken MCP registration is completed */
255-
'mcp/registration/completed': MCPSetupCompletedEvent;
256255
/** Sent when GitKraken MCP registration fails */
257256
'mcp/registration/failed': MCPSetupFailedEvent;
258257

src/env/node/gk/mcp/integration.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class GkMcpProvider implements McpServerDefinitionProvider, Disposable {
7171
try {
7272
const configuration = JSON.parse(output) as { name: string; type: string; command: string; args: string[] };
7373

74-
this.notifySetupCompleted(cliInstall.version);
74+
this.notifyRegistrationCompleted(cliInstall.version);
7575

7676
return {
7777
name: configuration.name,
@@ -82,23 +82,19 @@ export class GkMcpProvider implements McpServerDefinitionProvider, Disposable {
8282
};
8383
} catch (ex) {
8484
Logger.error(`Error getting MCP configuration: ${ex}`);
85-
this.notifySetupFailed('Error getting MCP configuration', undefined, cliInstall.version);
85+
this.notifyRegistrationFailed('Error getting MCP configuration', undefined, cliInstall.version);
8686
}
8787

8888
return undefined;
8989
}
9090

91-
private notifySetupCompleted(cliVersion?: string | undefined) {
91+
private notifyRegistrationCompleted(_cliVersion?: string | undefined) {
9292
if (!this.container.telemetry.enabled) return;
9393

94-
this.container.telemetry.sendEvent('mcp/registration/completed', {
95-
requiresUserCompletion: false,
96-
source: 'gk-mcp-provider',
97-
'cli.version': cliVersion,
98-
});
94+
this.container.telemetry.setGlobalAttribute('gk.mcp.registrationCompleted', true);
9995
}
10096

101-
private notifySetupFailed(reason: string, message?: string | undefined, cliVersion?: string | undefined) {
97+
private notifyRegistrationFailed(reason: string, message?: string | undefined, cliVersion?: string | undefined) {
10298
if (!this.container.telemetry.enabled) return;
10399

104100
this.container.telemetry.sendEvent('mcp/registration/failed', {

0 commit comments

Comments
 (0)