Skip to content

Commit 20a35c2

Browse files
opieter-awstomcat323
authored andcommitted
fix(telemetry): add result parameter when emitting telemetry (aws#7378)
## Problem Users are seeing `telemetry: invalid Metric: "codewhisperer_clientComponentLatency" emitted without the `result` property, which is always required. Consider using `.run()` instead of `.emit()`, which will set these properties automatically. See https://github.com/aws/aws-toolkit-vscode/blob/master/docs/telemetry.md#guidelines` ## Solution Add result attribute when emitting the metric --- - 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 da4686c commit 20a35c2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/core/src/codewhisperer/util/telemetryHelper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ export class TelemetryHelper {
659659
codewhispererSessionId: session.sessionId,
660660
codewhispererTriggerType: session.triggerType,
661661
credentialStartUrl: AuthUtil.instance.connection?.startUrl,
662+
result: 'Succeeded',
662663
})
663664
}
664665
public sendCodeScanEvent(languageId: string, jobId: string) {

0 commit comments

Comments
 (0)