Skip to content

Commit 1a313e4

Browse files
authored
telemetry(amazonq): missing autoDetected for metrics (aws#6704)
## Problem Missing fields for some code scan events ## Solution - Add `autoDetected` to: - `codewhisperer_codeScanIssueHover` - `codewhisperer_codeScanIssueIgnore` - `codewhisperer_codeScanIssueViewDetails` --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 8aac27b commit 1a313e4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ export const openSecurityIssuePanel = Commands.declare(
359359
detectorId: targetIssue.detectorId,
360360
ruleId: targetIssue.ruleId,
361361
credentialStartUrl: AuthUtil.instance.startUrl,
362+
autoDetected: targetIssue.autoDetected,
362363
})
363364
TelemetryHelper.instance.sendCodeScanRemediationsEvent(
364365
undefined,
@@ -834,6 +835,7 @@ export const ignoreAllIssues = Commands.declare(
834835
findingId: targetIssue.findingId,
835836
ruleId: targetIssue.ruleId,
836837
variant: 'all',
838+
autoDetected: targetIssue.autoDetected,
837839
})
838840
})
839841
}
@@ -867,6 +869,7 @@ export const ignoreIssue = Commands.declare(
867869
detectorId: targetIssue.detectorId,
868870
findingId: targetIssue.findingId,
869871
ruleId: targetIssue.ruleId,
872+
autoDetected: targetIssue.autoDetected,
870873
})
871874
})
872875
}

packages/core/src/codewhisperer/service/securityIssueHoverProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export class SecurityIssueHoverProvider implements vscode.HoverProvider {
4545
ruleId: issue.ruleId,
4646
includesFix: !!issue.suggestedFixes.length,
4747
credentialStartUrl: AuthUtil.instance.startUrl,
48+
autoDetected: issue.autoDetected,
4849
})
4950
TelemetryHelper.instance.sendCodeScanRemediationsEvent(
5051
document.languageId,

0 commit comments

Comments
 (0)