Skip to content

Commit 6071be7

Browse files
committed
move telemetry to after
1 parent d2448ee commit 6071be7

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

packages/core/src/codewhisperer/commands/basicCommands.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -376,31 +376,31 @@ export const openSecurityIssuePanel = Commands.declare(
376376
console.log('file Path', filePath)
377377
console.log('before', targetIssue.suggestedFixes.length === 0)
378378

379-
// telemetry.codewhisperer_codeScanIssueViewDetails.emit({
380-
// findingId: targetIssue.findingId,
381-
// detectorId: targetIssue.detectorId,
382-
// ruleId: targetIssue.ruleId,
383-
// credentialStartUrl: AuthUtil.instance.startUrl,
384-
// autoDetected: targetIssue.autoDetected,
385-
// })
386-
console.log('middle', targetIssue.suggestedFixes.length === 0)
387-
388-
// TelemetryHelper.instance.sendCodeScanRemediationsEvent(
389-
// undefined,
390-
// 'CODESCAN_ISSUE_VIEW_DETAILS',
391-
// targetIssue.detectorId,
392-
// targetIssue.findingId,
393-
// targetIssue.ruleId,
394-
// undefined,
395-
// undefined,
396-
// undefined,
397-
// !!targetIssue.suggestedFixes.length
398-
// )
399379
console.log('after', targetIssue.suggestedFixes.length === 0)
400380
if (targetIssue.suggestedFixes.length === 0) {
401381
console.log('going to generate fix as suggested fix length is 0')
402382
await generateFix.execute(targetIssue, targetFilePath, 'webview', true, false)
403383
}
384+
385+
telemetry.codewhisperer_codeScanIssueViewDetails.emit({
386+
findingId: targetIssue.findingId,
387+
detectorId: targetIssue.detectorId,
388+
ruleId: targetIssue.ruleId,
389+
credentialStartUrl: AuthUtil.instance.startUrl,
390+
autoDetected: targetIssue.autoDetected,
391+
})
392+
393+
TelemetryHelper.instance.sendCodeScanRemediationsEvent(
394+
undefined,
395+
'CODESCAN_ISSUE_VIEW_DETAILS',
396+
targetIssue.detectorId,
397+
targetIssue.findingId,
398+
targetIssue.ruleId,
399+
undefined,
400+
undefined,
401+
undefined,
402+
!!targetIssue.suggestedFixes.length
403+
)
404404
}
405405
)
406406

0 commit comments

Comments
 (0)