-
Couldn't load subscription status.
- Fork 1.3k
Modify telemetry to contain trigger time as property #22941
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 all commits
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 |
|---|---|---|
|
|
@@ -178,7 +178,9 @@ export class LanguageServerWatcher implements IExtensionActivationService, ILang | |
| // Start the language server. | ||
| if (startupStopWatch) { | ||
| // It means that startup is triggering this code, track time it takes since startup to activate this code. | ||
| sendTelemetryEvent(EventName.LANGUAGE_SERVER_TRIGGER_DURATION, startupStopWatch.elapsedTime); | ||
| sendTelemetryEvent(EventName.LANGUAGE_SERVER_TRIGGER_TIME, startupStopWatch.elapsedTime, { | ||
|
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. would it be tricky to make 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. I mentioned it to Courtney but My reason for adding FIRST_SESSION as a separate telemetry, rather than including it in EDITOR_LOAD is that EDITOR_LOAD will be sent every session, as opposed to FIRST_SESSION, so I figured we might be saving some bandwidth. But I can add it to EDITOR_LOAD if that's preferred, just let me know :) 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. Luciana mentioned it might be easier to create/filter metrics if this was a property in the I guess how difficult would it be to add as a property? If it would be a significant lift we can still work with it as designed. 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. No problem, I've added it as part of EDITOR_LOAD 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. I think we should also add it to the 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. That'd be a bit tough, to pass that info all the way down to where |
||
| triggerTime: startupStopWatch.elapsedTime, | ||
|
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 is also passed as a Measure. We could remove this later so long as it shows up correctly as a Measure since Properties as stored as strings. |
||
| }); | ||
| } | ||
| await languageServerExtensionManager.startLanguageServer(lsResource, interpreter); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,7 +64,7 @@ export enum EventName { | |
| EXTENSION_SURVEY_PROMPT = 'EXTENSION_SURVEY_PROMPT', | ||
|
|
||
| LANGUAGE_SERVER_ENABLED = 'LANGUAGE_SERVER.ENABLED', | ||
| LANGUAGE_SERVER_TRIGGER_DURATION = 'LANGUAGE_SERVER.TRIGGER_DURATION', | ||
|
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. Why is this name being changed? 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. Based on discussion with Courtney offline, it was mentioned that due to a bug the classification may have went to the wrong property bag Property<->Measures, hence changing name to avoid confusion and start afresh. |
||
| LANGUAGE_SERVER_TRIGGER_TIME = 'LANGUAGE_SERVER_TRIGGER_TIME', | ||
| LANGUAGE_SERVER_STARTUP = 'LANGUAGE_SERVER.STARTUP', | ||
| LANGUAGE_SERVER_READY = 'LANGUAGE_SERVER.READY', | ||
| LANGUAGE_SERVER_TELEMETRY = 'LANGUAGE_SERVER.EVENT', | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -723,6 +723,11 @@ export interface IEventNamePropertyMapping { | |||
| * If global interpreter is being used | ||||
| */ | ||||
| usingGlobalInterpreter?: boolean; | ||||
| /** | ||||
| * Carries `true` if it is the very first session of the user. We check whether persistent cache is empty | ||||
| * to approximately guess if it's the first session. | ||||
| */ | ||||
| isFirstSession?: boolean; | ||||
| }; | ||||
| /** | ||||
| * Telemetry event sent when substituting Environment variables to calculate value of variables | ||||
|
|
@@ -1329,11 +1334,17 @@ export interface IEventNamePropertyMapping { | |||
| * Track how long it takes to trigger language server activation code, after Python extension starts activating. | ||||
| */ | ||||
| /* __GDPR__ | ||||
| "language_server_trigger_duration" : { | ||||
|
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. Spoke with Luciana and it seems like this should be
might not be the main problem but could be contributing. Looks like with your changes it is correct based on the name change. 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. Yes, my new telemetry name matches it. You mentioned:
Based on which I changed the telemetry name. I think we should avoid using 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. I think the classification was addressed more so by adding |
||||
| "duration" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "karrtikr", "isMeasurement": true } | ||||
| "language_server_trigger_time" : { | ||||
| "duration" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "karrtikr" }, | ||||
| "triggerTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "karrtikr" } | ||||
| } | ||||
| */ | ||||
| [EventName.LANGUAGE_SERVER_TRIGGER_DURATION]: unknown; | ||||
| [EventName.LANGUAGE_SERVER_TRIGGER_TIME]: { | ||||
| /** | ||||
| * Time it took to trigger language server startup. | ||||
| */ | ||||
| triggerTime: number; | ||||
| }; | ||||
| /** | ||||
| * Telemetry event sent when starting Node.js server | ||||
| */ | ||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.