Skip to content

Commit b047c14

Browse files
authored
telemetry(cwl): fix LiveTail metric definitions aws#932
## Problem Addresses feedback on aws#916 ## Solution * Uses `hasTextFilter` instead of defining a new `hasLogEventFilterPattern` property * Defines a more generic `filterPattern` type, as an enum that supports logStream filter type strings * renames metrics to `cloudwatchlogs_startLiveTail` and `cloudwatchlogs_stopLiveTail`
1 parent 4cff9a9 commit b047c14

File tree

1 file changed

+42
-52
lines changed

1 file changed

+42
-52
lines changed

telemetry/definitions/commonDefinitions.json

Lines changed: 42 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,16 @@
12791279
"type": "string",
12801280
"description": "Filename extension (examples: .txt, .yml, .yaml, .asl.yaml, ...), or empty string if the filename does not contain dot (.) between two chars."
12811281
},
1282+
{
1283+
"name": "filterType",
1284+
"type": "string",
1285+
"allowedValues": [
1286+
"all",
1287+
"prefix",
1288+
"specific"
1289+
],
1290+
"description": "Type of filter applied"
1291+
},
12821292
{
12831293
"name": "findingId",
12841294
"type": "string",
@@ -1327,11 +1337,6 @@
13271337
"type": "boolean",
13281338
"description": "Whether the user has access to CodeWhisperer Chat"
13291339
},
1330-
{
1331-
"name": "hasLogEventFilterPattern",
1332-
"type": "boolean",
1333-
"description": "If LogEvent filter pattern is applied"
1334-
},
13351340
{
13361341
"name": "hasTextFilter",
13371342
"type": "boolean",
@@ -1498,11 +1503,6 @@
14981503
"type": "string",
14991504
"description": "User locale. Examples: en-US, en-GB, etc."
15001505
},
1501-
{
1502-
"name": "logStreamFilterType",
1503-
"type": "string",
1504-
"description": "Type of LogStream filter applied to session"
1505-
},
15061506
{
15071507
"name": "metricId",
15081508
"type": "string",
@@ -3786,6 +3786,38 @@
37863786
}
37873787
]
37883788
},
3789+
{
3790+
"name": "cloudwatchlogs_startLiveTail",
3791+
"description": "When user starts a new LiveTail command",
3792+
"metadata": [
3793+
{
3794+
"type": "filterType",
3795+
"required": false
3796+
},
3797+
{
3798+
"type": "hasTextFilter",
3799+
"required": false
3800+
},
3801+
{
3802+
"type": "sessionAlreadyStarted",
3803+
"required": true
3804+
},
3805+
{
3806+
"type": "source",
3807+
"required": true
3808+
}
3809+
]
3810+
},
3811+
{
3812+
"name": "cloudwatchlogs_stopLiveTail",
3813+
"description": "When user stops a liveTailSession",
3814+
"metadata": [
3815+
{
3816+
"type": "source",
3817+
"required": true
3818+
}
3819+
]
3820+
},
37893821
{
37903822
"name": "cloudwatchlogs_tailStream",
37913823
"description": "Tail stream off/on",
@@ -5075,48 +5107,6 @@
50755107
}
50765108
]
50775109
},
5078-
{
5079-
"name": "cwlLiveTail_Start",
5080-
"description": "When user starts a new LiveTail command",
5081-
"metadata": [
5082-
{
5083-
"type": "hasLogEventFilterPattern",
5084-
"required": false
5085-
},
5086-
{
5087-
"type": "logStreamFilterType",
5088-
"required": false
5089-
},
5090-
{
5091-
"type": "result"
5092-
},
5093-
{
5094-
"type": "sessionAlreadyStarted",
5095-
"required": true
5096-
},
5097-
{
5098-
"type": "source",
5099-
"required": true
5100-
}
5101-
]
5102-
},
5103-
{
5104-
"name": "cwlLiveTail_Stop",
5105-
"description": "When user stops a liveTailSession",
5106-
"metadata": [
5107-
{
5108-
"type": "duration",
5109-
"required": true
5110-
},
5111-
{
5112-
"type": "result"
5113-
},
5114-
{
5115-
"type": "source",
5116-
"required": true
5117-
}
5118-
]
5119-
},
51205110
{
51215111
"name": "deeplink_open",
51225112
"description": "User requested that a resource be opened in the browser using the deeplink service",

0 commit comments

Comments
 (0)