Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 52 additions & 52 deletions telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,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 @@ -1297,11 +1307,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 @@ -1443,11 +1448,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 @@ -3645,6 +3645,48 @@
}
]
},
{
"name": "cloudwatchlogs_startLiveTail",
"description": "When user starts a new LiveTail command",
"metadata": [
{
"type": "filterType",
"required": false
},
{
"type": "hasTextFilter",
"required": false
},
{
"type": "result"
},
{
"type": "sessionAlreadyStarted",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI: if "sessionAlreadyStarted" is a kind of failure, it's strongly recommended to simply throw an exception and let telemetry.xx.run(...) automatically set result=Failed and reason=<code> where <code> is the error code. https://github.com/aws/aws-toolkit-vscode/blob/016e478399f4e4e050e5e644c98c96297930e8ad/packages/core/src/shared/errors.ts#L144

That has other benefits: all failures can be captured in dashboards/queries easily, without needing to know specific, special fields such as this one.

However, if this is only an informational field and doesn't represent a failure or cancellation, then the above doesn't apply.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't consider this to be a failure case. This would be an informational field. The telemetry.xx.run(...) will not raise an exception.

"required": true
},
{
"type": "source",
"required": true
}
]
},
{
"name": "cloudwatchlogs_stopLiveTail",
"description": "When user stops a liveTailSession",
"metadata": [
{
"type": "duration",
"required": true
},
{
"type": "result"
},
{
"type": "source",
"required": true
}
]
},
{
"name": "cloudwatchlogs_tailStream",
"description": "Tail stream off/on",
Expand Down Expand Up @@ -5010,48 +5052,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
Loading