Releases: aws-powertools/powertools-lambda-typescript
v0.3.2 & v0.3.3
Summary
In this release we have continued improving our CDK examples and properly exported the LogFormatter
class in Logger
so that you can extend it and bring your own formatter.
As you'll notice from the title of the release we are merging together two tags. During the release of v0.3.2 we discovered an issue with our workflow that prevented some packages from being published to npm. The issue has been fixed (#480) and v0.3.3 has been released as result.
Changes
📜 Documentation updates
- docs: Improve examples/cdk/README.md (#467) by @alex-m-aws
- fix: updated CDK examples to remove old references & improve comments (#439) by @dreamorosi
🐛 Bug and hot fixes
- fix(logger): correctly export LogFormatter (#479) by @dreamorosi
- fix: updated CDK examples to remove old references & improve comments (#439) by @dreamorosi
🔧 Maintenance
This release was made possible by the following contributors:
v0.3.1
Summary
This release fixes a bug introduced in v0.3.0 where @aws-lambda-powertools/commons
module got corrupted due to a change in generated package structure. We reverted the commit and are adding checks to make sure it got caught before release.
Apologies for any inconvenience this might have caused.
Changes
🐛 Bug and hot fixes
🔧 Maintenance
This release was made possible by the following contributors:
v0.3.0
Summary
This new release brings a series of housekeeping changes and comes with the first breaking change in the Metrics
utility.
If you wanted to ensure that at least one metric is emitted before you send flush them, you can do so by passing a specific parameter to the middleware or decorator. Previous to this release the parameter was called raiseOnEmptyMetrics
, it has now been renamed to throwOnEmptyMetrics
to better conform with the way errors are called in Javascript.
This change applies also to the Tracer.throwOnEmptyMetrics()
method that you can use when not using decorators or middlewares.
Special thanks to all the community members that engaged and contributed with the project since launch!
Changes
💥 Breaking changes
- refactor(metrics): rename option property from raiseOnEmptyMetrics to throwOnEmptyMetrics (#416) by @kozub
🌟 Minor Changes
- build(logger): reduce node_modules size (#427) by @dreamorosi
📜 Documentation updates
- fix(build): Update contributing.md and fix npm ci (#417) by @michaelbrewer
- docs: Tracer example link goes to a 404 (#414) by @michaelbrewer
- docs(all): do not generate main version (#406) by @ijemmy
- feat(all): Update to examples use released version (0.2.0) (#405) by @ijemmy
- chore(all): fix doc typos and apply basic lint recommendations (#444) by @michaelbrewer
🐛 Bug and hot fixes
- fix(tracer): avoid throwing errors in manual instrumentation when running outside of AWS Lambda (#442) by @dreamorosi
- fix(metrics): Rename leftover reference to purgeStoredMetrics() function (#424) by @ijemmy
🔧 Maintenance
- fix(build): Fix linting issue and add linting to the pre-push hook (#440) by @ijemmy
- build(deps-dev): bump aws-sdk from 2.1055.0 to 2.1056.0 (#462) by @dependabot
- build(deps-dev): bump @commitlint/cli from 15.0.0 to 16.0.2 (#461) by @dependabot
- build(deps-dev): bump aws-sdk from 2.1052.0 to 2.1055.0 (#460) by @dependabot
- build(deps-dev): bump @aws-cdk/aws-lambda-nodejs from 1.138.0 to 1.139.0 (#457) by @dependabot
- build(deps-dev): bump aws-cdk from 1.138.0 to 1.139.0 (#456) by @dependabot
- build(deps-dev): bump esbuild from 0.14.5 to 0.14.11 (#459) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.9.0 to 5.9.1 (#455) by @dependabot
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.8.1 to 5.9.1 (#454) by @dependabot
- build(deps-dev): bump @aws-sdk/client-sts from 3.45.0 to 3.46.0 (#449) by @dependabot
- build(deps-dev): bump @types/node from 17.0.5 to 17.0.8 (#436) by @dependabot
- build(deps-dev): bump eslint from 8.5.0 to 8.6.0 (#434) by @dependabot
- build(deps): bump hosted-git-info from 4.0.2 to 4.1.0 (#432) by @dependabot
- build(deps-dev): bump aws-cdk from 1.137.0 to 1.138.0 (#437) by @dependabot
- build(deps-dev): bump @aws-cdk/aws-lambda-nodejs from 1.137.0 to 1.138.0 (#430) by @dependabot
- build(deps-dev): bump @aws-cdk/core from 1.137.0 to 1.138.0 (#433) by @dependabot
- build(deps-dev): bump jest from 27.4.5 to 27.4.7 (#429) by @dependabot
- build(deps-dev): bump aws-sdk from 2.1048.0 to 2.1052.0 (#428) by @dependabot
- build(deps-dev): bump eslint-plugin-import from 2.25.3 to 2.25.4 (#408) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.8.1 to 5.9.0 (#407) by @dependabot
- build(deps): bump @middy/core from 2.5.3 to 2.5.4 (#400) by @dependabot
- build(deps-dev): bump @types/jest from 27.0.3 to 27.4.0 (#409) by @dependabot
- chore: update changelogs (#410) by @dreamorosi
- chore: make all npm packages public (#402) by @flochaz
This release was made possible by the following contributors:
v0.2.0
Summary
Introducing AWS Lambda Powertools for Typescript, a suite of utilities for AWS Lambda functions running on the Node.js runtime, to ease the adoption of best practices such as tracing, structured logging, custom metrics, and more.
AWS Lambda Powertools for TypeScript is currently released as a beta developer preview and is intended strictly for feedback purposes only.
This version is not stable, and significant breaking changes might incur as part of the upcoming production-ready release.
--
Quick links: 📜 Documentation | ⬇️ NPM | 💬 Feature request | 🐛 Bug Report | ⚡️ CDK Examples
Logger
🤩 Key features 🤩
- Capture key fields from Lambda context, cold start and structures logging output as JSON
- Log Lambda context when instructed (disabled by default)
- Log sampling logs from all levels for a percentage of invocations (disabled by default)
- Append additional keys to structured log at any point in time
Metrics
🤩 Key features 🤩
- Aggregate up to 100 metrics using a single CloudWatch EMF object (large JSON blob)
- Validate against common metric definitions mistakes (metric unit, values, max dimensions, max metrics, etc)
- Metrics are created asynchronously by CloudWatch service, no custom stacks needed
- Context manager to create a one off metric with a different dimension
Tracer
🤩 Key features 🤩
- Auto capture cold start and service name as annotations, and responses or full exceptions as metadata
- Auto-disable when not running in AWS Lambda environment
- Support tracing functions via decorators, middleware, and manual instrumentation
- Support tracing AWS SDK v2 and v3 via AWS X-Ray SDK for Node.js
This release was made possible by the following contributors:
@alan-churley, @bahrmichael, @dreamorosi, @flochaz, @github-actions[bot], @heitorlessa, @ijemmy and @saragerion
Credits
Credits for the Lambda Powertools idea go to DAZN with their DAZN Lambda Powertools.