From 608571eb9d00c1b44b82f03a2e98d32b8c70bd00 Mon Sep 17 00:00:00 2001 From: Josh Pinkney <103940141+jpinkney-aws@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:59:41 -0500 Subject: [PATCH] feat: add general latency metrics (#913) ## Problem - Soooooooooo many teams have specific latency metric fields and many are asking to add them for re-invent ## Solution - De-dup a lot of them e.g. amazonqGenerateApproachLatency, amazonqGenerateCodeResponseLatency, amazonqEndOfTheConversationLatency, etc ## Other notes - amazonq_approachInvoke would then have perfServerLatency instead of an individual amazonqGenerateApproachLatency field - amazonq_codeGenerationInvoke would then have perfServerLatency instead of an individual amazonqGenerateCodeResponseLatency field - amazonq_endChat would then have perfE2ELatency instead of an individual amazonqEndOfTheConversationLatency field - In the future we can re-use the perfClientLatency metric for tracking the duration of different events that only happen in the client side (e.g. how long the client latency takes in the amazon q chat flow) --- telemetry/definitions/commonDefinitions.json | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/telemetry/definitions/commonDefinitions.json b/telemetry/definitions/commonDefinitions.json index 34bc1e17..2f2d93f7 100644 --- a/telemetry/definitions/commonDefinitions.json +++ b/telemetry/definitions/commonDefinitions.json @@ -1145,7 +1145,7 @@ "remoteDesktop", "ssh", "scp", - "ssm", + "ssm", "remoteWorkspace" ], "description": "Ways to connect to an EC2 Instance" @@ -1488,6 +1488,21 @@ "type": "int", "description": "Number of generation paths modified" }, + { + "name": "perfClientLatency", + "type": "double", + "description": "The time duration in milliseconds to process an action on the client side" + }, + { + "name": "perfE2ELatency", + "type": "double", + "description": "The time duration in milliseconds to complete an end to end flow" + }, + { + "name": "perfServerLatency", + "type": "double", + "description": "The time duration in milliseconds to finish a request to the server side" + }, { "name": "platform", "type": "string", @@ -7069,4 +7084,4 @@ ] } ] -} +} \ No newline at end of file