Skip to content

Commit a6aa0c8

Browse files
keeganirbyKeegan Irby
andauthored
feat(cwl): Add metric definitions for LiveTail (#916)
## Problem Cloudwatch wants to monitor usage metrics of the LiveTail integration ## Solution When starting a session emit telemetry for: * Session already started (this case happens when session is already running, and customer sends a new command that matches the already running session) * Has LogEventFilter * LogStream filter type * Source of the command (command palette, explorer) When closing a session: * Session duration * source of cancellation (ex: CodeLens, ClosingEditors) --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Keegan Irby <[email protected]>
1 parent 7e9a916 commit a6aa0c8

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

telemetry/definitions/commonDefinitions.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,11 @@
12971297
"type": "boolean",
12981298
"description": "Whether the user has access to CodeWhisperer Chat"
12991299
},
1300+
{
1301+
"name": "hasLogEventFilterPattern",
1302+
"type": "boolean",
1303+
"description": "If LogEvent filter pattern is applied"
1304+
},
13001305
{
13011306
"name": "hasTextFilter",
13021307
"type": "boolean",
@@ -1438,6 +1443,11 @@
14381443
"type": "string",
14391444
"description": "User locale. Examples: en-US, en-GB, etc."
14401445
},
1446+
{
1447+
"name": "logStreamFilterType",
1448+
"type": "string",
1449+
"description": "Type of LogStream filter applied to session"
1450+
},
14411451
{
14421452
"name": "metricId",
14431453
"type": "string",
@@ -1647,6 +1657,11 @@
16471657
"type": "string",
16481658
"description": "The name of the AWS service acted on. These values come from the AWS SDK. To find them in the JAVA SDK search for SERVICE_NAME in each service client, or look for serviceId in metadata in the service2.json"
16491659
},
1660+
{
1661+
"name": "sessionAlreadyStarted",
1662+
"type": "boolean",
1663+
"description": "Session already open that matches new request"
1664+
},
16501665
{
16511666
"name": "sessionDuration",
16521667
"type": "int",
@@ -4995,6 +5010,48 @@
49955010
}
49965011
]
49975012
},
5013+
{
5014+
"name": "cwlLiveTail_Start",
5015+
"description": "When user starts a new LiveTail command",
5016+
"metadata": [
5017+
{
5018+
"type": "hasLogEventFilterPattern",
5019+
"required": false
5020+
},
5021+
{
5022+
"type": "logStreamFilterType",
5023+
"required": false
5024+
},
5025+
{
5026+
"type": "result"
5027+
},
5028+
{
5029+
"type": "sessionAlreadyStarted",
5030+
"required": true
5031+
},
5032+
{
5033+
"type": "source",
5034+
"required": true
5035+
}
5036+
]
5037+
},
5038+
{
5039+
"name": "cwlLiveTail_Stop",
5040+
"description": "When user stops a liveTailSession",
5041+
"metadata": [
5042+
{
5043+
"type": "duration",
5044+
"required": true
5045+
},
5046+
{
5047+
"type": "result"
5048+
},
5049+
{
5050+
"type": "source",
5051+
"required": true
5052+
}
5053+
]
5054+
},
49985055
{
49995056
"name": "deeplink_open",
50005057
"description": "User requested that a resource be opened in the browser using the deeplink service",

0 commit comments

Comments
 (0)