Skip to content

Commit

Permalink
telemetry(cwl): fix LiveTail metric definitions #932
Browse files Browse the repository at this point in the history
## Problem
Addresses feedback on
#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`
  • Loading branch information
keeganirby authored Dec 5, 2024
1 parent 4cff9a9 commit b047c14
Showing 1 changed file with 42 additions and 52 deletions.
94 changes: 42 additions & 52 deletions telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,16 @@
"type": "string",
"description": "Filename extension (examples: .txt, .yml, .yaml, .asl.yaml, ...), or empty string if the filename does not contain dot (.) between two chars."
},
{
"name": "filterType",
"type": "string",
"allowedValues": [
"all",
"prefix",
"specific"
],
"description": "Type of filter applied"
},
{
"name": "findingId",
"type": "string",
Expand Down Expand Up @@ -1327,11 +1337,6 @@
"type": "boolean",
"description": "Whether the user has access to CodeWhisperer Chat"
},
{
"name": "hasLogEventFilterPattern",
"type": "boolean",
"description": "If LogEvent filter pattern is applied"
},
{
"name": "hasTextFilter",
"type": "boolean",
Expand Down Expand Up @@ -1498,11 +1503,6 @@
"type": "string",
"description": "User locale. Examples: en-US, en-GB, etc."
},
{
"name": "logStreamFilterType",
"type": "string",
"description": "Type of LogStream filter applied to session"
},
{
"name": "metricId",
"type": "string",
Expand Down Expand Up @@ -3786,6 +3786,38 @@
}
]
},
{
"name": "cloudwatchlogs_startLiveTail",
"description": "When user starts a new LiveTail command",
"metadata": [
{
"type": "filterType",
"required": false
},
{
"type": "hasTextFilter",
"required": false
},
{
"type": "sessionAlreadyStarted",
"required": true
},
{
"type": "source",
"required": true
}
]
},
{
"name": "cloudwatchlogs_stopLiveTail",
"description": "When user stops a liveTailSession",
"metadata": [
{
"type": "source",
"required": true
}
]
},
{
"name": "cloudwatchlogs_tailStream",
"description": "Tail stream off/on",
Expand Down Expand Up @@ -5075,48 +5107,6 @@
}
]
},
{
"name": "cwlLiveTail_Start",
"description": "When user starts a new LiveTail command",
"metadata": [
{
"type": "hasLogEventFilterPattern",
"required": false
},
{
"type": "logStreamFilterType",
"required": false
},
{
"type": "result"
},
{
"type": "sessionAlreadyStarted",
"required": true
},
{
"type": "source",
"required": true
}
]
},
{
"name": "cwlLiveTail_Stop",
"description": "When user stops a liveTailSession",
"metadata": [
{
"type": "duration",
"required": true
},
{
"type": "result"
},
{
"type": "source",
"required": true
}
]
},
{
"name": "deeplink_open",
"description": "User requested that a resource be opened in the browser using the deeplink service",
Expand Down

0 comments on commit b047c14

Please sign in to comment.