Skip to content

Commit 7fe8fcc

Browse files
committed
emit telemetry for auth_iamOptionClick
1 parent 0a052ad commit 7fe8fcc

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

aws-toolkit-vscode.code-workspace

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
{
22
"folders": [
33
{
4-
"path": "."
4+
"path": ".",
55
},
66
{
7-
"path": "packages/toolkit"
7+
"path": "packages/toolkit",
88
},
99
{
10-
"path": "packages/core"
10+
"path": "packages/core",
1111
},
1212
{
13-
"path": "packages/amazonq"
13+
"path": "packages/amazonq",
1414
},
1515
{
16-
"path": "../language-servers"
16+
"path": "../language-servers",
1717
},
1818
{
19-
"path": "../language-server-runtimes"
20-
}
19+
"path": "../language-server-runtimes",
20+
},
21+
{
22+
"path": "../aws-toolkit-common",
23+
},
2124
],
2225
"settings": {
2326
"typescript.tsdk": "node_modules/typescript/lib",

packages/core/src/login/webview/vue/backend.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export abstract class CommonAuthWebview extends VueWebview {
177177
accessKey: string,
178178
secretKey: string,
179179
sessionToken?: string,
180-
role_arn?: string,
180+
role_arn?: string
181181
): Promise<AuthError | undefined>
182182

183183
async showResourceExplorer(): Promise<void> {
@@ -231,6 +231,10 @@ export abstract class CommonAuthWebview extends VueWebview {
231231
} as AuthAddConnection)
232232
}
233233

234+
emitIamClick() {
235+
telemetry.auth_iamOptionClick.emit()
236+
}
237+
234238
/**
235239
* Incrementally store auth metric data during vue, backend sign in logic,
236240
* and cancellation flows.

packages/core/src/login/webview/vue/login.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,9 @@ export default defineComponent({
512512
}
513513
}
514514
} else if (this.selectedLoginOption === LoginOption.IAM_CREDENTIAL) {
515+
// Emit telemetry when IAM Credentials option is selected and Continue is clicked
516+
void client.emitIamClick()
517+
515518
this.stage = 'AWS_PROFILE'
516519
this.$nextTick(() => document.getElementById('profileName')!.focus())
517520
}
@@ -533,7 +536,13 @@ export default defineComponent({
533536
return
534537
}
535538
this.stage = 'AUTHENTICATING'
536-
const error = await client.startIamCredentialSetup(this.profileName, this.accessKey, this.secretKey, this.sessionToken, this.roleArn)
539+
const error = await client.startIamCredentialSetup(
540+
this.profileName,
541+
this.accessKey,
542+
this.secretKey,
543+
this.sessionToken,
544+
this.roleArn
545+
)
537546
if (error) {
538547
this.stage = 'START'
539548
void client.errorNotification(error)

0 commit comments

Comments
 (0)