-
Notifications
You must be signed in to change notification settings - Fork 132
chore: expose a hook to specify telemetry hosting mode MCP-166 #501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ type EventResult = { | |
}; | ||
|
||
export class Telemetry { | ||
public static hostingMode?: string; | ||
|
||
private isBufferingEvents: boolean = true; | ||
/** Resolves when the setup is complete or a timeout occurs */ | ||
public setupPromise: Promise<[string, boolean]> | undefined; | ||
|
@@ -42,6 +44,7 @@ export class Telemetry { | |
commonProperties?: CommonProperties; | ||
} = {} | ||
): Telemetry { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This assignment will throw a TypeError if Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
commonProperties.hosting_mode = Telemetry.hostingMode; | ||
const instance = new Telemetry(session, userConfig, commonProperties, { eventCache, deviceId }); | ||
|
||
void instance.setup(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,4 +73,5 @@ export type CommonProperties = { | |
config_atlas_auth?: TelemetryBoolSet; | ||
config_connection_string?: TelemetryBoolSet; | ||
session_id?: string; | ||
hosting_mode?: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: can we set the accepted strings here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The MCP server does not know them at this point - essentially, I want this to be a field populated by the application that hosts the server and we don't know beforehand what these applications are. |
||
} & CommonStaticProperties; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we default to standalone until updated by vscode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, though we would need to treat empty and standalone as identical for historical purposes.