@@ -226,8 +226,8 @@ export class TelemetryHelper {
226226 completionType : 'LINE' ,
227227 suggestionState : 'EMPTY' ,
228228 recommendationLatencyMilliseconds : 0 ,
229- triggerToResponseLatencyMilliseconds : session . timeToFirstRecommendation ,
230- perceivedLatencyMilliseconds : session . perceivedLatency ,
229+ triggerToResponseLatencyMilliseconds : this . session . timeToFirstRecommendation ,
230+ perceivedLatencyMilliseconds : this . session . perceivedLatency ,
231231 timestamp : new Date ( Date . now ( ) ) ,
232232 suggestionReferenceCount : 0 ,
233233 generatedLine : 0 ,
@@ -388,44 +388,44 @@ export class TelemetryHelper {
388388 . map ( ( e ) => e . codewhispererSuggestionCount )
389389 . reduce ( ( a , b ) => a + b , 0 )
390390
391- const aggregated : CodewhispererUserTriggerDecision = {
392- codewhispererAutomatedTriggerType : autoTriggerType ,
393- codewhispererCharactersAccepted : acceptedRecommendationContent . length ,
394- codewhispererClassifierResult : this . classifierResult ,
395- codewhispererClassifierThreshold : this . classifierThreshold ,
396- codewhispererCompletionType : aggregatedCompletionType ,
397- codewhispererCursorOffset : this . sessionDecisions [ 0 ] . codewhispererCursorOffset ,
398- codewhispererCustomizationArn : selectedCustomization . arn === '' ? undefined : selectedCustomization . arn ,
399- codewhispererFeatureEvaluations : FeatureConfigProvider . instance . getFeatureConfigsTelemetry ( ) ,
400- codewhispererFirstRequestId : this . sessionDecisions [ 0 ] . codewhispererFirstRequestId ,
401- codewhispererGettingStartedTask : this . session . taskType ,
402- codewhispererLanguage : language ,
403- codewhispererLineNumber : this . sessionDecisions [ 0 ] . codewhispererLineNumber ,
404- codewhispererPreviousSuggestionState : this . prevTriggerDecision ,
405- codewhispererSessionId : this . sessionDecisions [ 0 ] . codewhispererSessionId ,
406- codewhispererSuggestionCount : suggestionCount ,
407- codewhispererSuggestionImportCount : this . sessionDecisions
408- . map ( ( e ) => e . codewhispererSuggestionImportCount || 0 )
409- . reduce ( ( a , b ) => a + b , 0 ) ,
410- codewhispererSuggestionState : aggregatedSuggestionState ,
411- codewhispererSupplementalContextIsUtg : supplementalContextMetadata ?. isUtg ,
412- codewhispererSupplementalContextLength : supplementalContextMetadata ?. contentsLength ,
413- // eslint-disable-next-line id-length
414- codewhispererSupplementalContextStrategyId : supplementalContextMetadata ?. strategy ,
415- codewhispererSupplementalContextTimeout : supplementalContextMetadata ?. isProcessTimeout ,
416- codewhispererTimeSinceLastDocumentChange : this . timeSinceLastModification
417- ? this . timeSinceLastModification
418- : undefined ,
419- codewhispererTimeSinceLastUserDecision : this . lastTriggerDecisionTime
420- ? performance . now ( ) - this . lastTriggerDecisionTime
421- : undefined ,
422- codewhispererTimeToFirstRecommendation : this . session . timeToFirstRecommendation ,
423- codewhispererTriggerCharacter : autoTriggerType === 'SpecialCharacters' ? this . triggerChar : undefined ,
424- codewhispererTriggerType : this . sessionDecisions [ 0 ] . codewhispererTriggerType ,
425- codewhispererTypeaheadLength : this . typeAheadLength ,
426- credentialStartUrl : this . sessionDecisions [ 0 ] . credentialStartUrl ,
427- traceId : this . traceId ,
428- }
391+ const aggregated : CodewhispererUserTriggerDecision = {
392+ codewhispererAutomatedTriggerType : autoTriggerType ,
393+ codewhispererCharactersAccepted : acceptedRecommendationContent . length ,
394+ codewhispererClassifierResult : this . classifierResult ,
395+ codewhispererClassifierThreshold : this . classifierThreshold ,
396+ codewhispererCompletionType : aggregatedCompletionType ,
397+ codewhispererCursorOffset : this . sessionDecisions [ 0 ] . codewhispererCursorOffset ,
398+ codewhispererCustomizationArn : selectedCustomization . arn === '' ? undefined : selectedCustomization . arn ,
399+ codewhispererFeatureEvaluations : FeatureConfigProvider . instance . getFeatureConfigsTelemetry ( ) ,
400+ codewhispererFirstRequestId : this . sessionDecisions [ 0 ] . codewhispererFirstRequestId ,
401+ codewhispererGettingStartedTask : this . session . taskType ,
402+ codewhispererLanguage : language ,
403+ codewhispererLineNumber : this . sessionDecisions [ 0 ] . codewhispererLineNumber ,
404+ codewhispererPreviousSuggestionState : this . prevTriggerDecision ,
405+ codewhispererSessionId : this . sessionDecisions [ 0 ] . codewhispererSessionId ,
406+ codewhispererSuggestionCount : suggestionCount ,
407+ codewhispererSuggestionImportCount : this . sessionDecisions
408+ . map ( ( e ) => e . codewhispererSuggestionImportCount || 0 )
409+ . reduce ( ( a , b ) => a + b , 0 ) ,
410+ codewhispererSuggestionState : aggregatedSuggestionState ,
411+ codewhispererSupplementalContextIsUtg : supplementalContextMetadata ?. isUtg ,
412+ codewhispererSupplementalContextLength : supplementalContextMetadata ?. contentsLength ,
413+ // eslint-disable-next-line id-length
414+ codewhispererSupplementalContextStrategyId : supplementalContextMetadata ?. strategy ,
415+ codewhispererSupplementalContextTimeout : supplementalContextMetadata ?. isProcessTimeout ,
416+ codewhispererTimeSinceLastDocumentChange : this . timeSinceLastModification
417+ ? this . timeSinceLastModification
418+ : undefined ,
419+ codewhispererTimeSinceLastUserDecision : this . lastTriggerDecisionTime
420+ ? performance . now ( ) - this . lastTriggerDecisionTime
421+ : undefined ,
422+ codewhispererTimeToFirstRecommendation : this . session . timeToFirstRecommendation ,
423+ codewhispererTriggerCharacter : autoTriggerType === 'SpecialCharacters' ? this . triggerChar : undefined ,
424+ codewhispererTriggerType : this . sessionDecisions [ 0 ] . codewhispererTriggerType ,
425+ codewhispererTypeaheadLength : this . typeAheadLength ,
426+ credentialStartUrl : this . sessionDecisions [ 0 ] . credentialStartUrl ,
427+ traceId : this . traceId ,
428+ }
429429 telemetry . codewhisperer_userTriggerDecision . emit ( aggregated )
430430 this . prevTriggerDecision = this . getAggregatedSuggestionState ( this . sessionDecisions )
431431 this . lastTriggerDecisionTime = performance . now ( )
@@ -649,7 +649,8 @@ export class TelemetryHelper {
649649 telemetry . codewhisperer_clientComponentLatency . emit ( {
650650 codewhispererAllCompletionsLatency : this . _allPaginationEndTime - this . session . sdkApiCallStartTime ,
651651 codewhispererCompletionType : 'Line' ,
652- codewhispererCredentialFetchingLatency : this . session . sdkApiCallStartTime - this . session . fetchCredentialStartTime ,
652+ codewhispererCredentialFetchingLatency :
653+ this . session . sdkApiCallStartTime - this . session . fetchCredentialStartTime ,
653654 codewhispererCustomizationArn : getSelectedCustomization ( ) . arn ,
654655 codewhispererEndToEndLatency : this . session . firstSuggestionShowTime - this . session . invokeSuggestionStartTime ,
655656 codewhispererFirstCompletionLatency : this . _sdkApiCallEndTime - this . session . sdkApiCallStartTime ,
0 commit comments