@@ -20,7 +20,6 @@ import { getLogger } from '../../../shared/logger'
2020
2121import { Session } from '../../session/session'
2222import { i18n } from '../../../shared/i18n-helper'
23- import { telemetry } from '../../../shared/telemetry'
2423import path from 'path'
2524import { createSingleFileDialog } from '../../../shared/ui/common/openDialog'
2625import { MynahIcons } from '@aws/mynah-ui'
@@ -187,12 +186,6 @@ export class DocController {
187186 const codeGenerationId : string = message . messageId
188187 const zipFilePath : string = message . filePath
189188 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- } )
196189
197190 const workspacePrefixMapping = getWorkspaceFoldersByPrefixes ( session . config . workspaceFolders )
198191 const pathInfos = getPathsFromZipFilePath ( zipFilePath , workspacePrefixMapping , session . config . workspaceFolders )
@@ -357,7 +350,6 @@ export class DocController {
357350 }
358351
359352 private async fileClicked ( message : any ) {
360- // TODO: add Telemetry here
361353 const tabId : string = message . tabID
362354 const messageId = message . messageId
363355 const filePathToUpdate : string = message . filePath
@@ -397,12 +389,6 @@ export class DocController {
397389 private async newTask ( message : any ) {
398390 // Old session for the tab is ending, delete it so we can create a new one for the message id
399391 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- } )
406392 this . sessionStorage . deleteSession ( message . tabID )
407393
408394 // Re-run the opening flow, where we check auth + create a session
@@ -419,14 +405,7 @@ export class DocController {
419405 this . messenger . sendUpdatePlaceholder ( message . tabID , i18n ( 'AWS.amazonq.featureDev.placeholder.sessionClosed' ) )
420406 this . messenger . sendChatInputEnabled ( message . tabID , false )
421407
422- const session = await this . sessionStorage . getSession ( message . tabID )
423408 this . docGenerationTask . reset ( )
424-
425- telemetry . amazonq_endChat . emit ( {
426- amazonqConversationId : session . conversationId ,
427- amazonqEndOfTheConversationLatency : performance . now ( ) - session . telemetry . sessionStartTime ,
428- result : 'Succeeded' ,
429- } )
430409 }
431410
432411 private processErrorChatMessage = ( err : any , message : any , session : Session | undefined ) => {
@@ -492,7 +471,6 @@ export class DocController {
492471 }
493472
494473 private async stopResponse ( message : any ) {
495- telemetry . ui_click . emit ( { elementId : 'amazonq_stopCodeGeneration' } )
496474 this . messenger . sendAnswer ( {
497475 message : i18n ( 'AWS.amazonq.featureDev.pillText.stoppingCodeGeneration' ) ,
498476 type : 'answer-part' ,
@@ -679,18 +657,6 @@ export class DocController {
679657 try {
680658 session = await this . sessionStorage . getSession ( message . tabID )
681659
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- } )
694660 await session . insertChanges ( )
695661
696662 const readmePath = findReadmePath ( session . state . filePaths )
0 commit comments