Skip to content

chore(integration-tests): improve error logging for better debugging#1109

Merged
jchrostek-dd merged 3 commits intomainfrom
john/integ-test-error-logging
Mar 17, 2026
Merged

chore(integration-tests): improve error logging for better debugging#1109
jchrostek-dd merged 3 commits intomainfrom
john/integ-test-error-logging

Conversation

@jchrostek-dd
Copy link
Copy Markdown
Contributor

@jchrostek-dd jchrostek-dd commented Mar 17, 2026

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

  • TypeScript build passes
  • Manual verification during next integration test run

🤖 Generated with Claude Code

jchrostek-dd and others added 3 commits March 17, 2026 11:32
The function names formatLambdaError and formatDatadogError already
clearly describe their purpose - the JSDoc comments were just restating
what the code does.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move invokeLambda and InvocationResult from invoke.ts to lambda.ts
to keep all Lambda utilities in one file.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jchrostek-dd jchrostek-dd marked this pull request as ready for review March 17, 2026 16:06
@jchrostek-dd jchrostek-dd requested a review from a team as a code owner March 17, 2026 16:06
@gh-worker-ownership-write-b05516 gh-worker-ownership-write-b05516 bot review requested due to automatic review settings March 17, 2026 16:10
@jchrostek-dd jchrostek-dd merged commit 6b6d93a into main Mar 17, 2026
46 of 50 checks passed
@jchrostek-dd jchrostek-dd deleted the john/integ-test-error-logging branch March 17, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants