Skip to content

Commit 8301e43

Browse files
committed
address comment: remove redundant method
1 parent 754ce8d commit 8301e43

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

src/session.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ export class Session {
1414

1515
constructor() {
1616
this.baseUrl = config.apiBaseUrl ?? "https://cloud.mongodb.com/";
17-
17+
1818
// Store credentials if available
1919
if (config.apiClientId && config.apiClientSecret) {
2020
this.credentials = {
2121
clientId: config.apiClientId,
2222
clientSecret: config.apiClientSecret,
2323
};
24-
24+
2525
// Initialize API client with credentials
2626
this.apiClient = new ApiClient({
2727
baseUrl: this.baseUrl,

src/telemetry/telemetry.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,7 @@ export class Telemetry {
7171
return;
7272
}
7373

74-
const event = this.createToolEvent(command, category, startTime, result, error);
75-
await this.emit([event]);
76-
}
77-
78-
/**
79-
* Creates a tool event with common properties and timing information
80-
*/
81-
private createToolEvent(
82-
command: string,
83-
category: string,
84-
startTime: number,
85-
result: "success" | "failure",
86-
error?: Error
87-
): ToolEvent {
8874
const duration = Date.now() - startTime;
89-
9075
const event: ToolEvent = {
9176
timestamp: new Date().toISOString(),
9277
source: "mdbmcp",
@@ -104,7 +89,7 @@ export class Telemetry {
10489
},
10590
};
10691

107-
return event;
92+
await this.emit([event]);
10893
}
10994

11095
/**

0 commit comments

Comments
 (0)