Sourced from @aws-lambda-powertools/logger
's
releases.
v2.15.0
Summary
This minor release improves the Idempotency utility by adding support for custom key prefixes. It also fixes a regression in Logger that caused runtime errors when passing an
undefined
ornull
value as extra argument.⭐️ Thanks to
@ConnorKirk
,@VatsalGoel3
, and@shdq
for their contributions to this release!Custom Idempotency Key Prefix Support
The
makeIdempotent
,@idempotent
decorator, andmakeHandlerIdempotent
Middy.js middleware now support an optional keyPrefix parameter, allowing you to define custom prefixes for idempotency keys. With this feature, you can implement cross-function idempotency, group related operations under a common prefix, and ensure your idempotency records remain stable during code refactoring or Lambda function renaming.It allows you to override the default idempotency key prefix, which is typically a combination of Lambda function and function names. By specifying a custom prefix, you gain more control over the idempotency key structure.
Logging
undefined
ornull
argumentsIn v2.13.1 we introduced a regression that caused runtime errors when passing
undefined
ornull
as extra arguments. This edge case could happen only when not using TypeScript or when passing arguments with broad types likeany
orunknown
, since the types in all the logging methods already prevent you from passing these values. In this release we have fixed the regression so that Logger handles these values correctly.Changes
- chore(maintenance): set app sdk ua env variable when none is set (#3651) by
@dreamorosi
- chore(deps): bump actions/setup-node from 4.1.0 to 4.2.0 (#3630) by @dependabot[bot]
- chore(deps): bump aws-actions/configure-aws-credentials from 4.0.2 to 4.1.0 (#3629) by @dependabot[bot]
- chore(deps): bump release-drafter/release-drafter from 6.0.0 to 6.1.0 (#3628) by @dependabot[bot]
- chore(deps): bump actions/upload-artifact from 4.5.0 to 4.6.0 (#3622) by @dependabot[bot]
- chore(deps): bump actions/stale from 9.0.0 to 9.1.0 (#3621) by @dependabot[bot]
- chore(deps): bump actions/setup-go from 5.2.0 to 5.3.0 (#3620) by @dependabot[bot]
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.18 to 3.0.22 (#3619) by @dependabot[bot]
- chore(deps): bump github/codeql-action from 3.27.9 to 3.28.9 (#3618) by @dependabot[bot]
- chore(ci): fix double
@
in action hash (#3587) by@dreamorosi
🌟New features and non-breaking changes
- chore: revert "feat(logger): refresh sample rate calculation per invocation" (#3652) by
@dreamorosi
- feat(logger): refresh sample rate calculation per invocation (#3644) by
@am29d
- feat(logger): Emit a warning on buffer flush (#3639) by
@ConnorKirk
- feat(logger): Add log buffer and flush method (#3617) by
@ConnorKirk
- feat(idempotency): add support for custom key prefix (#3532) by
@shdq
- feat(parser): provide sub-path exports (#3598) by
@am29d
- feat(logger): add circular buffer (#3593) by
@VatsalGoel3
📜 Documentation updates
- chore: revert "feat(logger): refresh sample rate calculation per invocation" (#3652) by
@dreamorosi
- feat(logger): refresh sample rate calculation per invocation (#3644) by
@am29d
- chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3627) by @dependabot[bot]
- chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3626) by @dependabot[bot]
... (truncated)
Sourced from @aws-lambda-powertools/logger
's
changelog.
2.15.0 (2025-02-25)
Bug Fixes
- ci: Add permissions to jobs (#3586) (90c93ea)
- ci: fix path for latest SSM param (#3585) (e34952d)
- logger: handle illegal
null
/undefined
as extra args (#3614) (6f99073)Features
- idempotency: add support for custom key prefix (#3532) (7be7a83)
- logger: add circular buffer (#3593) (618cdee)
- logger: Add log buffer and flush method (#3617) (6968ca8)
- logger: Emit a warning on buffer flush (#3639) (f471552)
- logger: refresh sample rate calculation per invocation (#3644) (1d66a2a)
- parser: provide sub-path exports (#3598) (09f0aaa)
e85ef33
chore(ci): bump version to 2.15.0 (#3654)d94d3bf
chore(maintenance): set app sdk ua env variable when none is set (#3651)cd1331e
chore: revert "feat(logger): refresh sample rate calculation per
invocation" ...1d66a2a
feat(logger): refresh sample rate calculation per invocation (#3644)f471552
feat(logger): Emit a warning on buffer flush (#3639)7ae904a
chore(deps): bump actions/setup-node from 4.1.0 to 4.2.0 (#3630)152094b
chore(deps): bump aws-actions/configure-aws-credentials from 4.0.2 to
4.1.0 (...0594f28
chore(deps): bump release-drafter/release-drafter from 6.0.0 to 6.1.0
(#3628)a629010
chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates
(#3627)01b9937
chore(deps): bump the aws-cdk group across 1 directory with 2 updates
(#3626)