-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
Adding additional telemetry on CodeActions #152383
Adding additional telemetry on CodeActions #152383
Conversation
…Telemetry Added Telemetry for CodeActions (part of refactoring preview)
Support persisting the environment variable collection each terminal was created with
Mention history in terminal persistence settings
Profile support for global storage
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.
Adding some initial comments. Let me know if you have any questions about them
}; | ||
|
||
this._telemetryService.publicLog2<ApplyCodeActionEvent, ApplyCodeEventClassification>('codeAction.applyCodeAction', { | ||
codeActionFrom: <CodeMenuOpenedFrom>openedFromString, |
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.
You should not need the cast here
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.
Left the casting for now - not sure how I could set defaults from the interface (since there were a LOT of times where CodeActionTrigger were being called)
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.
This is because openedFromString
is CodeMenuOpenedFrom | undefined
. The cast is hiding an error here because we are always expecting a value, not undefined
@@ -123,6 +136,7 @@ export interface CodeActionTrigger { | |||
readonly position: Position; | |||
}; | |||
readonly preview?: boolean; | |||
readonly triggerAction?: CodeMenuOpenedFrom; |
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.
I think you should make this required. I just tested this and while it does cause a lot of compile errors, it also reveals cases that should have a triggerAction
passed in
}; | ||
|
||
this._telemetryService.publicLog2<ApplyCodeActionEvent, ApplyCodeEventClassification>('codeAction.applyCodeAction', { | ||
codeActionFrom: <CodeMenuOpenedFrom>openedFromString, |
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.
This is because openedFromString
is CodeMenuOpenedFrom | undefined
. The cast is hiding an error here because we are always expecting a value, not undefined
Building on top of PR #152081 for issue #151140 (for code actions telemetry and refactoring)