Commit f75a2be
refactor(ec2): improve error information in telemetry. (#6624)
## Problem
Within telemetry, there are a large group of fatal errors within EC2
Connect being grouped together under the same general error code.
Additionally, there is very little information in the error message to
determine the source of this error. Specifically, it appears the the
test SSM connection done before attempting to pass the connection to VS
Code, implemented
[here](https://github.com/aws/aws-toolkit-vscode/blob/b9af56c3097242fb796995479f864d95098bf713/packages/core/src/shared/extensions/ssh.ts#L133-L155),
can fail, and gives us a general error code with little information
about its root cause.
## Solution
- Add a specific error code for this connection type. (reused an old
unused one)
- Pipe the error from the child process into the error message so that
we get it in telemetry.
- Add a docstring to test connect function, since its not obvious whats
happening as it involves both ssh and ssm.
Example Error:
<img width="465" alt="image"
src="https://github.com/user-attachments/assets/8b27746d-9291-48a4-a125-dcea761a2c13"
/>
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
---------
Co-authored-by: Justin M. Keyes <[email protected]>1 parent f475a6c commit f75a2be
2 files changed
+18
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
| 224 | + | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
136 | 145 | | |
137 | 146 | | |
138 | 147 | | |
139 | 148 | | |
| 149 | + | |
| 150 | + | |
140 | 151 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 152 | + | |
147 | 153 | | |
148 | 154 | | |
149 | 155 | | |
150 | 156 | | |
151 | | - | |
152 | 157 | | |
153 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
154 | 161 | | |
155 | 162 | | |
156 | 163 | | |
| |||
0 commit comments