Commit 6b6d93a
chore(integration-tests): improve error logging for better debugging (#1109)
## Summary
- Integration tests can sometimes be a little flaky. It isn't clear what
the errors are, but seems like some sort of request throttling.
Rerunning the tests succeeds. Adding some better logging for this.
- No changes to actual extension code.
## Changes
- **invoke.ts**: Log `TooManyRequestsException` reason and
`retryAfterSeconds`
- **lambda.ts**: Add detailed error logging to `publishVersion()`,
`setTimestampEnvVar()`, `waitForSnapStartReady()`
- **datadog.ts**: Log HTTP status, rate limit headers, and query context
for API errors
- **misc**: Moved lambda invoke code from invoke.ts to lambda.ts.
## Example Output
```
Lambda invocation failed for 'my-function': TooManyRequestsException - Rate exceeded - (Reason: ConcurrentSnapshotCreateLimitExceeded) - (retryAfterSeconds: 5)
Error searching traces: Error (query: 'service:my-service @request_id:abc123'): HTTP 429 Too Many Requests (retry-after: 30s)
```
## Test plan
- [x] TypeScript build passes
- [x] Manual verification during next integration test run
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 7225b58 commit 6b6d93a
4 files changed
Lines changed: 119 additions & 55 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
20 | 57 | | |
21 | 58 | | |
22 | 59 | | |
| |||
72 | 109 | | |
73 | 110 | | |
74 | 111 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
80 | 115 | | |
| 116 | + | |
81 | 117 | | |
82 | 118 | | |
83 | 119 | | |
| |||
164 | 200 | | |
165 | 201 | | |
166 | 202 | | |
167 | | - | |
168 | | - | |
| 203 | + | |
| 204 | + | |
169 | 205 | | |
170 | 206 | | |
171 | 207 | | |
| |||
182 | 218 | | |
183 | 219 | | |
184 | 220 | | |
185 | | - | |
186 | | - | |
| 221 | + | |
187 | 222 | | |
| 223 | + | |
188 | 224 | | |
189 | 225 | | |
190 | 226 | | |
| |||
214 | 250 | | |
215 | 251 | | |
216 | 252 | | |
217 | | - | |
218 | | - | |
| 253 | + | |
| 254 | + | |
219 | 255 | | |
220 | 256 | | |
221 | 257 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
2 | 10 | | |
3 | 11 | | |
4 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
5 | 68 | | |
6 | 69 | | |
7 | 70 | | |
| |||
19 | 82 | | |
20 | 83 | | |
21 | 84 | | |
22 | | - | |
23 | | - | |
| 85 | + | |
| 86 | + | |
24 | 87 | | |
25 | 88 | | |
26 | 89 | | |
| |||
45 | 108 | | |
46 | 109 | | |
47 | 110 | | |
48 | | - | |
49 | | - | |
| 111 | + | |
| 112 | + | |
50 | 113 | | |
51 | 114 | | |
52 | 115 | | |
| |||
71 | 134 | | |
72 | 135 | | |
73 | 136 | | |
74 | | - | |
75 | | - | |
| 137 | + | |
| 138 | + | |
76 | 139 | | |
77 | 140 | | |
78 | 141 | | |
| |||
0 commit comments