Releases: aws-powertools/powertools-lambda-typescript
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.