Skip to content

Commit

Permalink
Upgrade: [dependabot] - bump @aws-lambda-powertools/logger from 2.15.…
Browse files Browse the repository at this point in the history
…0 to 2.16.0 (#355)

Bumps
[@aws-lambda-powertools/logger](https://github.com/aws-powertools/powertools-lambda-typescript)
from 2.15.0 to 2.16.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aws-powertools/powertools-lambda-typescript/releases"><code>@​aws-lambda-powertools/logger</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v2.16.0</h2>
<h2>Summary</h2>
<p>We are excited to announce a new feature in Logger: Logger buffering.
This new feature allows you to buffer logs for a specific invocation,
and flush them automatically on error or manually as needed.</p>
<p>We also fixed a bug in the Batch Processing utility that prevented
SQS FIFO messages from the same group to be processed correctly during
retries</p>
<p>Finally, we now publish our Lambda layers to three new regions Mexico
(<code>mx-central-1</code>), Thailand (<code>ap-southeast-7</code>), and
Malaysia (<code>ap-southeast-5</code>).</p>
<p>⭐️ Thanks to <a
href="https://github.com/VatsalGoel3"><code>@​VatsalGoel3</code></a> and
<a href="https://github.com/ConnorKirk"><code>@​ConnorKirk</code></a>
for their significant contributions to this release!</p>
<h3>New Log Buffering feature</h3>
<blockquote>
<p><a
href="https://docs.powertools.aws.dev/lambda/typescript/2.14.0/core/logger/#buffering-logs">Docs</a></p>
</blockquote>
<p>You can now enable log buffering by passing
<code>logBufferOptions</code> when initializing a new Logger instance.
This feature allows you to:</p>
<ul>
<li>Buffer logs at the <code>WARN</code>, <code>INFO</code>,
<code>DEBUG</code>, and <code>TRACE</code> levels</li>
<li>Automatically flush logs on error or manually as needed</li>
<li>Reduce CloudWatch costs by decreasing the number of emitted log
messages</li>
</ul>
<p><img
src="https://github.com/user-attachments/assets/91f5a134-9b9b-4f3d-9198-0d00e43bbeb9"
alt="carbon-8" /></p>
<h4>Configuration options</h4>
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>maxBytes</code></td>
<td>Maximum size of the buffer in bytes</td>
<td><code>20480</code></td>
</tr>
<tr>
<td><code>minLevel</code></td>
<td>Minimum log level to buffer (more verbose levels are also
buffered)</td>
<td><code>DEBUG</code></td>
</tr>
<tr>
<td><code>flushOnErrorLog</code></td>
<td>Whether to flush buffer when an error is logged</td>
<td>true</td>
</tr>
<tr>
<td><code>enabled</code></td>
<td>Whether log buffering is enabled</td>
<td>N/A</td>
</tr>
</tbody>
</table>
<p>When log buffering is enabled, you can now pass a new opt-in
<code>flushBufferOnUncaughtError</code> flag to the
<code>injectLambdaContext()</code> class method decorator and Middy.js
middleware. When enabled, <strong>1/</strong> we'll intercept any error
thrown, <strong>2/</strong> flush the buffer, and <strong>3/</strong>
re-throw your original error. This enables you to have detailed logs
from your application when you need them the most.</p>
<p><img
src="https://github.com/user-attachments/assets/daae5f47-1cc2-4d54-ac7e-22a0e737b7c5"
alt="carbon-7" /></p>
<blockquote>
<p>For detailed explanations with diagrams, please refer to our <a
href="https://docs.powertools.aws.dev/lambda/typescript/stage/core/logger/#buffering-workflows">comprehensive
documentation</a>.</p>
</blockquote>
<h4>Buffering FAQs</h4>
<p><strong>Q: Does the buffer persist across Lambda
invocations?</strong>
A: No. Each Lambda invocation has its own buffer. The buffer initializes
when the Lambda function is invoked and clears after function completion
or manual flushing.</p>
<p><strong>Q: Are my logs buffered during cold starts?</strong>
A: No. We never buffer logs during cold starts to ensure all logs from
this phase are immediately available for debugging.</p>
<p><strong>Q: How can I prevent log buffering from consuming excessive
memory?</strong>
A: You can limit the size of the buffer by setting the maxBytes option
in the logBufferOptions constructor parameter. This will ensure that the
buffer does not grow indefinitely and consume excessive memory.</p>
<p><strong>Q: What happens if the log buffer reaches its maximum
size?</strong></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CHANGELOG.md"><code>@​aws-lambda-powertools/logger</code>'s
changelog</a>.</em></p>
<blockquote>
<h1><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/compare/v2.15.0...v2.16.0">2.16.0</a>
(2025-03-07)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>batch:</strong> clear message group references after request
(<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3674">#3674</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/270115e288a552bdb32083f04f23530725a86243">270115e</a>)</li>
<li><strong>ci:</strong> Update layer balance scripts (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3660">#3660</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/aa14637b0531b7a4a36d38158f684b68723c822e">aa14637</a>)</li>
<li><strong>parser:</strong> envelope sub-path exports regression (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3667">#3667</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/beac1021107f4c117a561829b3b9ab1f404a4e14">beac102</a>)</li>
<li><strong>parser:</strong> update S3 Event Schema (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3671">#3671</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/c14c7b3e7e1366379cd5062c91e09a62ddf7a42a">c14c7b3</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>logger:</strong> Enable log buffering feature (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3641">#3641</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/82030167abe3797392b919db2b4a006ae47e0ef7">8203016</a>)</li>
<li><strong>logger:</strong> flush buffer on uncaught error decorator
(<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3676">#3676</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/28db2e3c34e5fe27cb894112bf5c248704b3d9ea">28db2e3</a>)</li>
<li><strong>logger:</strong> Flush buffer on uncaught error in Middy
middleware (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3690">#3690</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/23eebe46bd4d07315545ecefa672d53d14ac9a72">23eebe4</a>)</li>
<li><strong>logger:</strong> refresh sample rate calculation before each
invocation (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3672">#3672</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/8c8d6b2ea4ccd473f56b05913169cc5995765562">8c8d6b2</a>)</li>
<li><strong>validation:</strong> add <a
href="https://github.com/validator"><code>@​validator</code></a>
decorator for JSON Schema validation (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3679">#3679</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/ae6b7cf9dae3e1d233b9c51ca1e1dc04b26efa9a">ae6b7cf</a>)</li>
<li><strong>validation:</strong> Add Middy.js middleware for JSON Schema
validation (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3694">#3694</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/443202bad2672ff26cc8237f417b8bf14bbd02d9">443202b</a>)</li>
<li><strong>validation:</strong> implement validate function (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3662">#3662</a>)
(<a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/f55127b7f894b5c673e739da06cbaabe12d0d1ca">f55127b</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/540a14bdad298eae023dc79c880c44fabe1b6e3f"><code>540a14b</code></a>
chore(ci): bump version to 2.16.0 (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3702">#3702</a>)</li>
<li><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/1ca4b262b784b02df75bbf1bdfd0923a62772a90"><code>1ca4b26</code></a>
refactor(logger): align implementation to spec + docs (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3701">#3701</a>)</li>
<li><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/1a48d2cd991d0b15f2e52f504ead19720958ff62"><code>1a48d2c</code></a>
chore(deps): bump jinja2 from 3.1.5 to 3.1.6 in /docs (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3698">#3698</a>)</li>
<li><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/443202bad2672ff26cc8237f417b8bf14bbd02d9"><code>443202b</code></a>
feat(validation): Add Middy.js middleware for JSON Schema validation (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3694">#3694</a>)</li>
<li><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/34d917e15d801c2118b5ea4c449a8100553cede3"><code>34d917e</code></a>
chore(deps): bump <code>@​types/node</code> from 22.13.8 to 22.13.9 (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3695">#3695</a>)</li>
<li><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/23eebe46bd4d07315545ecefa672d53d14ac9a72"><code>23eebe4</code></a>
feat(logger): Flush buffer on uncaught error in Middy middleware (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3690">#3690</a>)</li>
<li><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/58f376e361390935817f8a00591aa12f5d72468b"><code>58f376e</code></a>
chore(deps): bump the aws-cdk group across 1 directory with 2 updates
(<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3687">#3687</a>)</li>
<li><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/9839e130e0d1c17364ef8e074214399e7334afe3"><code>9839e13</code></a>
chore(deps): bump squidfunk/mkdocs-material from <code>2615302</code> to
<code>047452c</code> in /d...</li>
<li><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/0693f71b4e6b31d7bf05f4d5dd4a0459e7b6816a"><code>0693f71</code></a>
chore(deps): bump mkdocs-material from 9.6.5 to 9.6.7 in /docs (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3686">#3686</a>)</li>
<li><a
href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/ae6b7cf9dae3e1d233b9c51ca1e1dc04b26efa9a"><code>ae6b7cf</code></a>
feat(validation): add <a
href="https://github.com/validator"><code>@​validator</code></a>
decorator for JSON Schema validation (<a
href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/3679">#3679</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/aws-powertools/powertools-lambda-typescript/compare/v2.15.0...v2.16.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@aws-lambda-powertools/logger&package-manager=npm_and_yarn&previous-version=2.15.0&new-version=2.16.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Mar 10, 2025
1 parent a98e542 commit 9b0cb09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"typescript": "^5.8.2"
},
"dependencies": {
"@aws-lambda-powertools/logger": "^2.15.0",
"@aws-lambda-powertools/logger": "^2.16.0",
"@types/mustache": "^4.2.5",
"aws-lambda": "^1.0.7",
"axios": "^1.8.2",
Expand Down

0 comments on commit 9b0cb09

Please sign in to comment.