amplify-backend
amplify-backend copied to clipboard
feat: add support for function logs streaming to sandbox
Changes
Add support for streaming function logs in sandbox
-
CLI
- Default to disabled with an explicit opt-in
--stream-function-logs - Allow customers to specify a list of function names for which logs should be streamed
- Sandbox with
--onceshould not stream function logs - Allow specifying a file path to stream all the function's execution log events to.
- Default to disabled with an explicit opt-in
-
Display
- Display log events with the "friendly name" of the function in a specific color. Total of 5 colors used in round robin
- Display a timestamp for each log event
- Colors are turned off for file writing.
-
Functionality
- While sandbox is idle, function logs are streamed in parallel for all the functions as they are executed.
- Log streaming is paused during a deployment and resumes from the time the deployment was initiated to avoid intermingling the logs
- New functions, deleted functions are automatically updated after a deployment, i.e. if customer adds a new function, it's logs will be automatically streamed (if no filter was used)
Validation
Unit tests added
Checklist
- [x] If this PR includes a functional change to the runtime behavior of the code, I have added or updated automated test coverage for this change.
- [ ] If this PR requires a change to the Project Architecture README, I have included that update in this PR.
- [ ] If this PR requires a docs update, I have linked to that docs PR above.
- [ ] If this PR modifies E2E tests, makes changes to resource provisioning, or makes SDK calls, I have run the PR checks with the
run-e2elabel set.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
🦋 Changeset detected
Latest commit: e14f0041ba519d77a1cd6a5d029c57d0589ef3dd
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 4 packages
| Name | Type |
|---|---|
| @aws-amplify/cli-core | Minor |
| @aws-amplify/sandbox | Minor |
| @aws-amplify/backend-cli | Minor |
| create-amplify | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR