-
Notifications
You must be signed in to change notification settings - Fork 53
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
telemetry: Code Scan Issue Fix diff usage #907
Conversation
@@ -4398,6 +4408,34 @@ | |||
} | |||
] | |||
}, | |||
{ | |||
"name": "codewhisperer_codeScanIssueGenerateFixDiffUse", |
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.
can we add findingId
?
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.
there is already codewhisperer_codeScanIssueApplyFix
. why can't "diff" be a field (name TBD) on that existing metric?
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.
Added the codeFixAction to codewhisperer_codeScanIssueApplyFix
"acceptDiff", | ||
"insertAtCursor", | ||
"copyDiff" |
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.
Shouldn't this map to the buttons in the webview? If that's the case it should be openDiff
instead of acceptDiff
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.
Corrected it and added quickFix as well to codeFixActions
"required": false | ||
}, | ||
{ | ||
"type": "variant", |
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.
How will variant
be used 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.
Not used anymore.
"openDiff", | ||
"insertAtCursor", | ||
"copyDiff", | ||
"quickFix" |
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.
If I understand correctly, we will use codewhisperer_codeScanIssueApplyFix
for both applying the fix and actions before applying the fix, is that right?
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.
yes
Co-authored-by: Tai Lai <[email protected]>
## Problem - `codeFixAction` in `codewhisperer_codeScanIssueApplyFix` event is marked as required. ## Solution - Updating `codeFixAction` in `codewhisperer_codeScanIssueApplyFix` event. - This change is related to this PR: #907
Problem
Need to record Telemetry when user is accepting code scan issue generated fix with three options of viewing code, inserting or copying it.
Solution
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.