Skip to content

fix(lambda): bump @aws-lambda-powertools/tracer from 1.17.0 to 2.0.4 in /lambdas #3845

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 Apr 15, 2024

Bumps @aws-lambda-powertools/tracer from 1.17.0 to 2.0.4.

Release notes

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

v2.0.4

Summary

This release introduces a new Powertools utility to work with JMESPath, adds the ability to trace requests made via the fetch module for Tracer, and brings bug fixes and improvements for the Logger and Idempotency utilities.

JMESPath

We're excited to release the JMESPath utility, a fully spec compliant high-level library to parse and extract data from JSON objects using JMESPath expressions.

Usage

To get started, install the library by running:

npm i @aws-lambda-powertools/jmespath

At its core, the library provides a utility function to extract data from a JSON object using a JMESPath expression.

import { search } from '@aws-lambda-powertools/jmespath';
import { Logger } from '@aws-lambda-powertools/logger';
const logger = new Logger();
type MyEvent = {
foo: {
bar: string;
};
}
export const handler = async (event: MyEvent): Promise<void> => {
const result = search(event, 'foo.bar');
logger.info(result); // "baz"
};

In some cases however, you may want to extract data from an envelope. The library provides a utility function to help you work with envelopes and extract data from them.

import { extractDataFromEnvelope } from '@aws-lambda-powertools/jmespath/envelopes';
type MyEvent = {
body: string; // "{&quot;customerId&quot;:&quot;dd4649e6-2484-4993-acb8-0f9123103394&quot;}"
deeplyNested: Array<{ someData: number[] }>;
};
type MessageBody = {
customerId: string;
};
</tr></table>

... (truncated)

Changelog

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

2.0.4 (2024-04-10)

Bug Fixes

idempotency: return correct value from in-memory cache (#2309) (5b4c103) logger: buffer logs emitted during init (#2269) (1439867)

Features

tracer: support tracing fetch requests (#1619) (607548b) jmespath public release of JMESPAth utility (#1645) (233ff9b)

Minor Changes

logger: use template literal instead of node:util format (#2283) (961ace1)

2.0.3 (2024-03-15)

feat(logger): improve regex in stack trace parsing (#2121) (ebe5eef) fix(idempotency): transform private class fields (#2230) (aa6e6e0) improv(commons):: expand type utils functions (#2191) (9208393) feat(commons): add fromBase64 helper function (#2188) (133159b) fix(layers):: add createRequire banner in esm build (#2231) (730bcc9)

2.0.2 (2024-03-05)

Bug Fixes

  • tracer: modify aws-xray-sdk-core import for js (#2164) (29630b5)

2.0.1 (2024-03-04)

Note: Version bump only for package aws-lambda-powertools-typescript

2.0.0 (2024-03-04)

Note: Version bump only for package aws-lambda-powertools-typescript

... (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 v16 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
  • 3f296d2 chore(ci): bump version to 2.0.4 (#2348)
  • bd88aed chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions (#2343)
  • 4841789 chore(deps): bump @​types/node from 20.12.5 to 20.12.6 (#2342)
  • 22d5134 chore(maintenance): update release flow diagram (#2322)
  • d34c905 chore(docs): streamline docs homepage (#2328)
  • 1399551 chore(deps-dev): bump typedoc from 0.25.12 to 0.25.13 (#2333)
  • 3eeddb5 chore(deps-dev): bump aws-sdk from 2.1593.0 to 2.1595.0 (#2338)
  • 069dacc chore(deps): bump @​types/node from 20.12.4 to 20.12.5 (#2334)
  • 062f329 chore(deps): bump the aws-cdk group with 2 updates (#2332)
  • 91c5690 chore(deps): bump github/codeql-action from 3.24.9 to 3.24.10 (#2331)
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by aws-powertools-bot, a new releaser for @​aws-lambda-powertools/tracer since your current version.


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.17.0 to 2.0.4.
- [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.17.0...v2.0.4)

---
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 Apr 15, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Apr 22, 2024

Superseded by #3864.

@dependabot dependabot bot closed this Apr 22, 2024
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/lambdas/aws-lambda-powertools/tracer-2.0.4 branch April 22, 2024 19:41
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.

0 participants