File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -439,9 +439,27 @@ export class CodeReview {
439439 )
440440
441441 this . logging . info ( 'Findings count grouped by file' )
442- aggregatedCodeScanIssueList . forEach ( item =>
442+ aggregatedCodeScanIssueList . forEach ( item => {
443443 this . logging . info ( `File path - ${ item . filePath } Findings count - ${ item . issues . length } ` )
444- )
444+ item . issues . forEach ( issue =>
445+ CodeReviewUtils . emitMetric (
446+ {
447+ reason : SuccessMetricName . IssuesDetected ,
448+ result : 'Succeeded' ,
449+ metadata : {
450+ codewhispererCodeScanJobId : jobId ,
451+ credentialStartUrl : this . credentialsProvider . getConnectionMetadata ( ) ?. sso ?. startUrl ,
452+ findingId : issue . findingId ,
453+ detectorId : issue . detectorId ,
454+ ruleId : issue . ruleId ,
455+ autoDetected : false ,
456+ } ,
457+ } ,
458+ this . logging ,
459+ this . telemetry
460+ )
461+ )
462+ } )
445463
446464 return {
447465 codeReviewId : jobId ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export enum FailedMetricName {
1010}
1111export enum SuccessMetricName {
1212 CodeScanSuccess = 'codeScanSuccess' ,
13+ IssuesDetected = 'issuesDetected' ,
1314}
1415
1516export type ValidateInputAndSetupResult = {
You can’t perform that action at this time.
0 commit comments