@@ -20,7 +20,6 @@ import { getLogger } from '../../../shared/logger'
20
20
21
21
import { Session } from '../../session/session'
22
22
import { i18n } from '../../../shared/i18n-helper'
23
- import { telemetry } from '../../../shared/telemetry'
24
23
import path from 'path'
25
24
import { createSingleFileDialog } from '../../../shared/ui/common/openDialog'
26
25
import { MynahIcons } from '@aws/mynah-ui'
@@ -187,12 +186,6 @@ export class DocController {
187
186
const codeGenerationId : string = message . messageId
188
187
const zipFilePath : string = message . filePath
189
188
const session = await this . sessionStorage . getSession ( tabId )
190
- telemetry . amazonq_isReviewedChanges . emit ( {
191
- amazonqConversationId : session . conversationId ,
192
- enabled : true ,
193
- result : 'Succeeded' ,
194
- credentialStartUrl : AuthUtil . instance . startUrl ,
195
- } )
196
189
197
190
const workspacePrefixMapping = getWorkspaceFoldersByPrefixes ( session . config . workspaceFolders )
198
191
const pathInfos = getPathsFromZipFilePath ( zipFilePath , workspacePrefixMapping , session . config . workspaceFolders )
@@ -357,7 +350,6 @@ export class DocController {
357
350
}
358
351
359
352
private async fileClicked ( message : any ) {
360
- // TODO: add Telemetry here
361
353
const tabId : string = message . tabID
362
354
const messageId = message . messageId
363
355
const filePathToUpdate : string = message . filePath
@@ -397,12 +389,6 @@ export class DocController {
397
389
private async newTask ( message : any ) {
398
390
// Old session for the tab is ending, delete it so we can create a new one for the message id
399
391
this . docGenerationTask = new DocGenerationTask ( )
400
- const session = await this . sessionStorage . getSession ( message . tabID )
401
- telemetry . amazonq_endChat . emit ( {
402
- amazonqConversationId : session . conversationId ,
403
- amazonqEndOfTheConversationLatency : performance . now ( ) - session . telemetry . sessionStartTime ,
404
- result : 'Succeeded' ,
405
- } )
406
392
this . sessionStorage . deleteSession ( message . tabID )
407
393
408
394
// Re-run the opening flow, where we check auth + create a session
@@ -419,14 +405,7 @@ export class DocController {
419
405
this . messenger . sendUpdatePlaceholder ( message . tabID , i18n ( 'AWS.amazonq.featureDev.placeholder.sessionClosed' ) )
420
406
this . messenger . sendChatInputEnabled ( message . tabID , false )
421
407
422
- const session = await this . sessionStorage . getSession ( message . tabID )
423
408
this . docGenerationTask . reset ( )
424
-
425
- telemetry . amazonq_endChat . emit ( {
426
- amazonqConversationId : session . conversationId ,
427
- amazonqEndOfTheConversationLatency : performance . now ( ) - session . telemetry . sessionStartTime ,
428
- result : 'Succeeded' ,
429
- } )
430
409
}
431
410
432
411
private processErrorChatMessage = ( err : any , message : any , session : Session | undefined ) => {
@@ -492,7 +471,6 @@ export class DocController {
492
471
}
493
472
494
473
private async stopResponse ( message : any ) {
495
- telemetry . ui_click . emit ( { elementId : 'amazonq_stopCodeGeneration' } )
496
474
this . messenger . sendAnswer ( {
497
475
message : i18n ( 'AWS.amazonq.featureDev.pillText.stoppingCodeGeneration' ) ,
498
476
type : 'answer-part' ,
@@ -679,18 +657,6 @@ export class DocController {
679
657
try {
680
658
session = await this . sessionStorage . getSession ( message . tabID )
681
659
682
- const acceptedFiles = ( paths ?: { rejected : boolean } [ ] ) => ( paths || [ ] ) . filter ( ( i ) => ! i . rejected ) . length
683
-
684
- const amazonqNumberOfFilesAccepted =
685
- acceptedFiles ( session . state . filePaths ) + acceptedFiles ( session . state . deletedFiles )
686
-
687
- telemetry . amazonq_isAcceptedCodeChanges . emit ( {
688
- credentialStartUrl : AuthUtil . instance . startUrl ,
689
- amazonqConversationId : session . conversationId ,
690
- amazonqNumberOfFilesAccepted,
691
- enabled : true ,
692
- result : 'Succeeded' ,
693
- } )
694
660
await session . insertChanges ( )
695
661
696
662
const readmePath = findReadmePath ( session . state . filePaths )
0 commit comments