Skip to content

Commit

Permalink
telemetry: Code Scan Issue Fix diff usage (#907)
Browse files Browse the repository at this point in the history
## 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
- Added Telemetry event to record it.
<!---
    REMINDER:
    - Read CONTRIBUTING.md first.
    - Add test coverage for your changes.
    - Link to related issues/commits.
    - Testing: how did you test your changes?
    - Screenshots if applicable
-->

## License

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

---------

Co-authored-by: Tai Lai <[email protected]>
  • Loading branch information
ashishrp-aws and ctlai95 authored Nov 11, 2024
1 parent ed4ed38 commit 95eb2bc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,17 @@
"local"
]
},
{
"name": "codeFixAction",
"type": "string",
"description": "Captures the type of fix that was accepted",
"allowedValues": [
"openDiff",
"insertAtCursor",
"copyDiff",
"applyFix"
]
},
{
"name": "codeScanServiceInvocationsDuration",
"type": "int",
Expand Down Expand Up @@ -4352,6 +4363,9 @@
"name": "codewhisperer_codeScanIssueApplyFix",
"description": "Called when a code scan issue suggested fix is applied",
"metadata": [
{
"type": "codeFixAction"
},
{
"type": "component"
},
Expand Down

0 comments on commit 95eb2bc

Please sign in to comment.