Skip to content

fix(lambda): bump @aws-lambda-powertools/tracer from 1.18.1 to 2.6.0 in /lambdas #4016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 29, 2024

Bumps @aws-lambda-powertools/tracer from 1.18.1 to 2.6.0.

Release notes

Sourced from @​aws-lambda-powertools/tracer's releases.

v2.6.0

Summary

This release 1/ promotes Parser to Generally Available and ready for production, and 2/ adds support for unsupported types serialization in Logger.

⭐ Big thanks to @​daschaa for helping improve our code quality automation 🏅 Congrats to @​marlapativ & @​sandrokeil on their first contribution

Parser is Generally Available

Docs

We want to thank the community who engaged with us, tested Parser during beta, and provided valuable feedback and contributions to improve everyone' experience.

New to Parser?

Parser provides data validation and parsing using Zod, a TypeScript-first schema declaration and validation library, and comes with built-in schemas and envelopes for common AWS event types for AWS Lambda.

To get started with Parser, you also need to install Zod:

npm install @aws-lambda-powertools/parser zod@~3

Next, you can extend one of the schemas using your own schema, and parse the event both with class method decorators (or Middy.js):

carbon-2

Support unserializable types

Docs

You can now extend the default logic used to emit JSON-structured logs by passing a custom serializer function to the Logger constructor, using the jsonReplacerFn option. This is useful when you want to customize the serialization of specific values.

carbon-3

Changes

🌟New features and non-breaking changes

  • feat(parser): allow parser set event type of handler with middy (#2786) by @​am29d

... (truncated)

Changelog

Sourced from @​aws-lambda-powertools/tracer's changelog.

2.6.0 (2024-07-25)

Features

  • logger: introduce loglevel constant (#2787) (e75f593)
  • parser: allow parser set event type of handler with middy (#2786) (9973f09)

2.5.0 (2024-07-15)

Bug Fixes

  • parser: include error cause in ParseError (#2774) (34d0b55)

Features

  • logger: custom function for unserializable values (JSON replacer) (#2739) (fbc8688)

2.4.0 (2024-07-10)

Bug Fixes

  • idempotency: check error identity via names (#2747) (55c3878)

Features

  • batch: add option to not throw FullBatchFailureError when the entire batch fails (#2711) (74198ef)
  • internal: support Middy.js 5.x (#2748) (1d7ad61)
  • layers: deploy Lambda layers in ap-south-2 and me-central-1 (#2675) (208c57a)
  • logger: time zone aware timestamp in Logger (#2710) (9fe4c75)
  • maintenance: drop support for Node.js 16.x (#2717) (e4eee73)

2.3.0 (2024-06-27)

... (truncated)

Upgrade guide

Sourced from @​aws-lambda-powertools/tracer's upgrade guide.


title: Upgrade guide description: Guide to update between major Powertools for AWS Lambda (TypeScript) versions

End of support v1

!!! warning "On March 13th, 2024, Powertools for AWS Lambda (TypeScript) v1 entered maintenance mode, and will reach end-of-life on September 1st, 2024. If you are still using v1, we strongly recommend you to read our upgrade guide and update to the latest version."

Given our commitment to all of our customers using Powertools for AWS Lambda (TypeScript), we will keep npm v1 releases and documentation 1.x versions to prevent any disruption.

Migrate from v1 to v2

V2 is focused on official support for ESM (ECMAScript modules). We've made other minimal breaking changes to make your transition to v2 as smooth as possible.

Quick summary

Area Change Code change required
ESM support Added ESM support via dual CommonJS and ESM bundling, enabling top-level await and tree-shaking. -
Middy.js Updated import path for Middy.js middlewares to leverage subpath exports - i.e. @aws-lambda-powertools/tracer/middleware. Yes
Types imports Updated import path for TypeScript types to leverage subpath exports - i.e. @aws-lambda-powertools/logger/types. Yes
Logger Changed log sampling to dynamically switch log level to DEBUG on a percentage of requests. -
Logger Updated custom log formatter to include standard as well as persistent keys. Yes
Logger Removed ContextExamples from @aws-lambda-powertools/commons package. Yes
Logger and Tracer Removed deprecated createLogger and createTracer helper functions in favor of direct instantiation. Yes

First steps

Before you start, we suggest making a copy of your current working project or create a new git branch.

  1. Upgrade Node.js to v18 or higher, Node.js v20 is recommended.
  2. Ensure that you have the latest Powertools for AWS Lambda (TypeScript) version via Lambda Layer or npm.
  3. Review the following sections to confirm whether they apply to your codebase.

ESM support

With support for ES Modules in v2, you can now use import instead of require syntax.

This is especially useful when you want to run asynchronous code during the initialization phase by using top-level await.

import { getSecret } from '@aws-lambda-powertools/parameters/secrets';
// This code will run during the initialization phase of your Lambda function
const myApiKey = await getSecret('my-api-key', { transform: 'json' });
export const handler = async (_event: unknown, _context: unknown) => {
</tr></table>

... (truncated)

Commits
  • b285858 chore(ci): bump version to 2.6.0 (#2839)
  • 2deb223 chore(parser): review imports (#2838)
  • f76acbe chore(ci): revert bump version to 2.6.0 (#2836)
  • 38198e9 chore(ci): bump version to 2.6.0 (#2834)
  • d94d70b chore(parser): mark parser as GA (#2831)
  • df71d78 improv(logger): export LoggerInterface (#2832)
  • 84192bb chore(docs): Add lambda layer policy to versioning docs (#2824)
  • 72803e2 chore(maintenance): migrate parser utility to biome (#2822)
  • 22203cc chore(deps-dev): bump typedoc from 0.26.4 to 0.26.5 in the typedoc group acro...
  • 507861c chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2818)
  • Additional commits viewable in compare view

Dependabot compatibility score

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 commands and options

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)

Bumps [@aws-lambda-powertools/tracer](https://github.com/aws-powertools/powertools-lambda-typescript) from 1.18.1 to 2.6.0.
- [Release notes](https://github.com/aws-powertools/powertools-lambda-typescript/releases)
- [Changelog](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CHANGELOG.md)
- [Upgrade guide](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/docs/upgrade.md)
- [Commits](aws-powertools/powertools-lambda-typescript@v1.18.1...v2.6.0)

---
updated-dependencies:
- dependency-name: "@aws-lambda-powertools/tracer"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jul 29, 2024
@npalm npalm closed this Jul 31, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 31, 2024

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/npm_and_yarn/lambdas/aws-lambda-powertools/tracer-2.6.0 branch July 31, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant