Skip to content

Commit f48fb42

Browse files
committed
reorder sendUserTriggerDecisionTelemetry alphabetically
1 parent 35f8251 commit f48fb42

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

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

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -261,21 +261,31 @@ export class TelemetryHelper {
261261
.reduce((a, b) => a + b, 0)
262262

263263
const aggregated: CodewhispererUserTriggerDecision = {
264-
codewhispererSessionId: this.sessionDecisions[0].codewhispererSessionId,
265-
codewhispererFirstRequestId: this.sessionDecisions[0].codewhispererFirstRequestId,
266-
credentialStartUrl: this.sessionDecisions[0].credentialStartUrl,
264+
codewhispererAutomatedTriggerType: autoTriggerType,
265+
codewhispererCharactersAccepted: acceptedRecommendationContent.length,
266+
codewhispererClassifierResult: this.classifierResult,
267+
codewhispererClassifierThreshold: this.classifierThreshold,
267268
codewhispererCompletionType: aggregatedCompletionType,
268-
codewhispererLanguage: language,
269+
codewhispererCursorOffset: this.sessionDecisions[0].codewhispererCursorOffset,
270+
codewhispererCustomizationArn: selectedCustomization.arn === '' ? undefined : selectedCustomization.arn,
271+
codewhispererFeatureEvaluations: FeatureConfigProvider.instance.getFeatureConfigsTelemetry(),
272+
codewhispererFirstRequestId: this.sessionDecisions[0].codewhispererFirstRequestId,
269273
codewhispererGettingStartedTask: session.taskType,
270-
codewhispererTriggerType: this.sessionDecisions[0].codewhispererTriggerType,
271-
codewhispererSuggestionCount: suggestionCount,
272-
codewhispererAutomatedTriggerType: autoTriggerType,
274+
codewhispererLanguage: language,
273275
codewhispererLineNumber: this.sessionDecisions[0].codewhispererLineNumber,
274-
codewhispererCursorOffset: this.sessionDecisions[0].codewhispererCursorOffset,
276+
codewhispererPreviousSuggestionState: this.prevTriggerDecision,
277+
278+
codewhispererSessionId: this.sessionDecisions[0].codewhispererSessionId,
279+
codewhispererSuggestionCount: suggestionCount,
275280
codewhispererSuggestionImportCount: this.sessionDecisions
276281
.map((e) => e.codewhispererSuggestionImportCount || 0)
277282
.reduce((a, b) => a + b, 0),
278-
codewhispererTypeaheadLength: this.typeAheadLength,
283+
codewhispererSuggestionState: aggregatedSuggestionState,
284+
codewhispererSupplementalContextIsUtg: supplementalContextMetadata?.isUtg,
285+
codewhispererSupplementalContextLength: supplementalContextMetadata?.contentsLength,
286+
// eslint-disable-next-line id-length
287+
codewhispererSupplementalContextStrategyId: supplementalContextMetadata?.strategy,
288+
codewhispererSupplementalContextTimeout: supplementalContextMetadata?.isProcessTimeout,
279289
codewhispererTimeSinceLastDocumentChange: this.timeSinceLastModification
280290
? this.timeSinceLastModification
281291
: undefined,
@@ -284,18 +294,9 @@ export class TelemetryHelper {
284294
: undefined,
285295
codewhispererTimeToFirstRecommendation: session.timeToFirstRecommendation,
286296
codewhispererTriggerCharacter: autoTriggerType === 'SpecialCharacters' ? this.triggerChar : undefined,
287-
codewhispererSuggestionState: aggregatedSuggestionState,
288-
codewhispererPreviousSuggestionState: this.prevTriggerDecision,
289-
codewhispererClassifierResult: this.classifierResult,
290-
codewhispererClassifierThreshold: this.classifierThreshold,
291-
codewhispererSupplementalContextTimeout: supplementalContextMetadata?.isProcessTimeout,
292-
codewhispererSupplementalContextIsUtg: supplementalContextMetadata?.isUtg,
293-
codewhispererSupplementalContextLength: supplementalContextMetadata?.contentsLength,
294-
codewhispererCustomizationArn: selectedCustomization.arn === '' ? undefined : selectedCustomization.arn,
295-
// eslint-disable-next-line id-length
296-
codewhispererSupplementalContextStrategyId: supplementalContextMetadata?.strategy,
297-
codewhispererCharactersAccepted: acceptedRecommendationContent.length,
298-
codewhispererFeatureEvaluations: FeatureConfigProvider.instance.getFeatureConfigsTelemetry(),
297+
codewhispererTriggerType: this.sessionDecisions[0].codewhispererTriggerType,
298+
codewhispererTypeaheadLength: this.typeAheadLength,
299+
credentialStartUrl: this.sessionDecisions[0].credentialStartUrl,
299300
traceId: this.traceId,
300301
}
301302
telemetry.codewhisperer_userTriggerDecision.emit(aggregated)

0 commit comments

Comments
 (0)