Releases: aws-powertools/powertools-lambda-typescript
v0.9.1
Summary
@AWSDB introduces a change that relaxes the restrictions introduced by #614. In #565, we decided to restrict the additional logging data objects in their shape. It turned out, that this restriction prevents from logging of arbitrary objects, which is inconvenient.
In his change, type restrictions are removed, so it is now possible to specify any object as additional payload when calling the logger methods directly.
Changes
🐛 Bug and hot fixes
🔧 Maintenance
- build(deps): bump aws-sdk from 2.1134.0 to 2.1140.0 (#900) by @dependabot
- build(deps-dev): bump @aws-sdk/client-dynamodb from 3.58.0 to 3.95.0 (#891) by @dependabot
- build(deps-dev): bump @types/lodash.pickby from 4.6.6 to 4.6.7 (#892) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.23.0 to 5.25.0 (#893) by @dependabot
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.23.0 to 5.25.0 (#894) by @dependabot
- build(deps): bump constructs from 10.1.7 to 10.1.12 (#895) by @dependabot
- build(deps-dev): bump @types/lodash.merge from 4.6.6 to 4.6.7 (#896) by @dependabot
- build(deps-dev): bump axios from 0.27.1 to 0.27.2 (#897) by @dependabot
- build(deps): bump @aws-sdk/client-sts from 3.87.0 to 3.95.0 (#889) by @dependabot
- build(deps-dev): bump @commitlint/cli from 16.2.4 to 17.0.0 (#886) by @dependabot
- build(deps-dev): bump @types/node from 17.0.33 to 17.0.35 (#888) by @dependabot
- build(deps-dev): bump @types/lodash.clonedeep from 4.5.6 to 4.5.7 (#885) by @dependabot
- build(deps): bump aws-xray-sdk-core from 3.3.4 to 3.3.5 (#887) by @dependabot
- build(deps): bump mkdocs-material from 8.2.14 to 8.2.15 in /docs (#898) by @dependabot
This release was made possible by the following contributors:
@AWSDB, @dependabot and @dependabot[bot]
v0.9.0
Summary
This release introduces a range of new improvements.
SAM example
Thanks to @bpauwels's contribution, we now have a deployable example that relies on SAM CLI.
Now the folder examples/sam
contains source code and supporting files for a serverless application that you can deploy with the SAM CLI.
The application uses several AWS resources, including Lambda functions and an API Gateway API. These resources are defined in the template.yaml
file.
E2E tests improvements
@ijemmy worked on a refactor of our E2E tests, which are now more stable. Changes include but are not limited to: usage of Github Actions matrix, testing of Node.js runtime version 12 and 14, and unique stack names.
Correct record of xray_trace_id in log items
As reported by user @humanzz in #773 the Logger utility was not including the xray_trace_id
key in logs. This field is listed in the documentation as a standard key that should appear in each log.
xray_trace_id
is now correctly appearing in the logs.
Changes
🌟New features and non-breaking changes
- feat(examples): added sam example to workflows (#849) by @dreamorosi
📜 Documentation updates
🐛 Bug and hot fixes
- fix(actions): reintroduce token to checkout repo in release workflow (#848) by @dreamorosi
- fix(logger): add xray_trace_id to every log (#776) by @dreamorosi
- fix(actions): added back fetch-depth: 0 (#812) by @dreamorosi
- fix(actions): removed token from remaining actions (#805) by @dreamorosi
🔧 Maintenance
- build(deps): bump aws-cdk-lib from 2.23.0 to 2.24.1 (#874) by @dependabot
- build(deps-dev): bump @aws-cdk/cx-api from 2.23.0 to 2.24.1 (#873) by @dependabot
- build(deps-dev): bump @aws-cdk/cloudformation-diff from 2.23.0 to 2.24.1 (#871) by @dependabot
- build(deps-dev): bump cdk-assets from 2.23.0 to 2.24.1 (#868) by @dependabot
- build(deps-dev): bump @types/lodash.clonedeep from 4.5.6 to 4.5.7 (#870) by @dependabot
- build(deps-dev): bump @types/lodash.pickby from 4.6.6 to 4.6.7 (#869) by @dependabot
- build(deps-dev): bump @types/lodash.merge from 4.6.6 to 4.6.7 (#866) by @dependabot
- build(deps-dev): bump @aws-sdk/client-dynamodb from 3.58.0 to 3.87.0 (#872) by @dependabot
- build(deps): bump aws-sdk from 2.1133.0 to 2.1134.0 (#862) by @dependabot
- build(deps): bump aws-xray-sdk-core from 3.3.4 to 3.3.5 (#867) by @dependabot
- build(deps-dev): bump @types/node from 17.0.32 to 17.0.33 (#857) by @dependabot
- build(deps): bump release-drafter/release-drafter from 5.19.0 to 5.20.0 (#858) by @dependabot
- build(deps): bump mkdocs-material from 8.2.13 to 8.2.14 in /docs (#865) by @dependabot
- chore(tracer): rename package folder to tracer (#854) by @dreamorosi
- build(deps): bump constructs from 10.1.5 to 10.1.7 (#853) by @dependabot
- build(deps-dev): bump @types/node from 17.0.31 to 17.0.32 (#852) by @dependabot
- build(deps): bump aws-sdk from 2.1132.0 to 2.1133.0 (#851) by @dependabot
- build(deps-dev): bump esbuild from 0.14.38 to 0.14.39 (#850) by @dependabot
- fix(actions): reintroduce token to checkout repo in release workflow (#848) by @dreamorosi
- build(deps): bump aws-sdk from 2.1131.0 to 2.1132.0 (#847) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.21.0 to 5.23.0 (#844) by @dependabot
- build(deps-dev): bump @aws-cdk/cloudformation-diff from 2.22.0 to 2.23.0 (#843) by @dependabot
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.21.0 to 5.23.0 (#841) by @dependabot
- build(deps-dev): bump cdk-assets from 2.22.0 to 2.23.0 (#842) by @dependabot
- Add class documentation FunctionSegmentNotDefinedErrorunexpected and make end_time optional (#845) by @ijemmy
- build(deps-dev): bump @aws-cdk/cx-api from 2.22.0 to 2.23.0 (#840) by @dependabot
- build(deps): bump constructs from 10.0.127 to 10.1.5 (#839) by @dependabot
- build(deps): bump aws-cdk-lib from 2.22.0 to 2.23.0 (#838) by @dependabot
- build(deps-dev): bump @types/node from 17.0.30 to 17.0.31 (#837) by @dependabot
- build(deps): bump aws-sdk from 2.1124.0 to 2.1131.0 (#836) by @dependabot
- build(deps-dev): bump husky from 7.0.4 to 8.0.1 (#835) by @dependabot
- build(deps): bump @aws-sdk/client-sts from 3.80.0 to 3.87.0 (#834) by @dependabot
- build(deps-dev): bump @types/jest from 27.4.1 to 27.5.0 (#833) by @dependabot
- build(deps-dev): bump eslint from 8.14.0 to 8.15.0 (#832) by @dependabot
- build(deps): bump @types/aws-lambda from 8.10.95 to 8.10.97 (#831) by @dependabot
- test(all): switch to use GitHub strategy matrix and fix flaky tests (#828) by @ijemmy
- build(deps): bump mkdocs-material from 8.2.11 to 8.2.13 in /docs (#827) by @dependabot
- test(tracer): make e2e tests to follow the same convention in Logger and Metrics (#788) by @ijemmy
- build(deps-dev): bump typescript from 4.6.3 to 4.6.4 (#824) by @dependabot
- build(deps-dev): bump @aws-cdk/cloudformation-diff from 2.21.1 to 2.22.0 (#823) by @dependabot
- build(deps): bump constructs from 10.0.126 to 10.0.127 (#822) by @dependabot
- build(deps-dev): bump @commitlint/cli from 16.2.3 to 16.2.4 (#821) by @dependabot
- build(deps): bump aws-sdk from 2.1122.0 to 2.1124.0 (#819) by @dependabot
- build(deps-dev): bump cdk-assets from 2.21.1 to 2.22.0 (#820) by @dependabot
- build(deps): bump aws-cdk-lib from 2.21.1 to 2.22.0 (#818) by @dependabot
- build(deps-dev): bump @types/node from 17.0.27 to 17.0.30 (#817) by @dependabot
- build(deps): bump @aws-sdk/client-sts from 3.76.0 to 3.80.0 (#816) by @dependabot
- build(deps-dev): bump @aws-cdk/cx-api from 2.21.1 to 2.22.0 (#815) by @dependabot
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.20.0 to 5.21.0 (#810) by @dependabot
- build(deps): bump constructs from 10.0.118 to 10.0.126 (#809) by @dependabot
- build(deps-dev): bump axios from 0.26.1 to 0.27.1 (#807) by @dependabot
- build(deps): bump aws-sdk from 2.1121.0 to 2.1122.0 (#813) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.20.0 to 5.21.0 (#806) by @dependabot
- build(deps-dev): bump eslint from 8.13.0 to 8.14.0 (#804) by @dependabot
- build(deps): bump aws-cdk-lib from 2.20.0 to 2.21.1 (#803) by @dependabot
- build(deps): bump @types/aws-lambda from 8.10.93 to 8.10.95 (#801) by @dependabot
- build(deps-dev): bump esbuild from 0.14.36 to 0.14.38 (#800) by @dependabot
- build(deps-dev): bump @types/node from 17.0.26 to 17.0.27 (#808) by @dependabot
- build(deps-dev): bump @aws-cdk/cloudformation-diff from 2.20.0 to 2.21.1 (#802) by @dependabot
- build(deps-dev): bump @aws-cdk/cx-api from 2.20.0 to 2.21.1 (#799) by @dependabot
- build(deps): bump aws-sdk from 2.1116.0 to 2.1121.0 (#811) by @dependabot
- build(deps): bump @aws-sdk/client-sts from 3.72.0 to 3.76.0 (#797) by @dependabot
- build(deps): bump mkdocs-material from 8.2.7 to 8.2.11 in /docs (#798) by @dependabot
- build(deps-dev): bump cdk-assets from 2.20.0 to 2.21.1 (#794) by @dependabot
- fix(actions): added back fetch-depth: 0 (#812) by @dreamorosi
- build(deps-dev): bump @types/node from 17.0.24 to 17.0.26 (#795) by @dependabot
- fix(actions): removed token from remaining actions (#805) by @dreamorosi
- chore: updated depdendabot configs (#766) by @dreamorosi
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.19.0 to 5.20.0 (#783) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.19.0 to 5.20.0 (#782) by @dependabot
- build(deps): bump aws-sdk from 2.1115.0 to 2.1116.0 (#780) by @dependabot
- build(deps): bump constructs from 10.0.115 to 10.0.118 (#781) by @dependabot
- build(deps-dev): bump archiver from 5.3.0 to 5.3.1 (#779) by @dependabot
- build(deps): bump @aws-sdk/client-sts from 3.67.0 to 3.72.0 (#778) by @dependabot
- build(deps-dev): bump concurrently from 7.0.0 to 7.1.0 (#772) by @dependabot
- build(deps-dev): bump @aws-sdk/client-dynamodb from 3.58.0 to 3.67.0 (#771) by @dependabot
- build(deps): bump aws-sdk from 2.1114.0 to 2.1115.0 (#775) by @dependabot
- build(deps): bump constructs from 10.0.114 to 10.0.115 (#774) by @dependabot
- build(deps-dev): bump @types/node from 17.0.23 to 17.0.24 (#769) by @dependabot
- build(deps): bump aws-sdk from 2.1113.0 to 2.1114.0 (#770) by @dependabot
- build(deps): bump constructs from 10.0.113 to 10.0.114 (#768) by @dependabot
This release was made possible by the following contributors:
@bpauwels, @dependabot, @dependabot[bot], @dreamorosi and @ijemmy
v0.8.1
Summary
This is a patch release for those using Logger together with 3rd party providers like New Relic, Honeycomb, and others. This release ensures that all the log entries generated by the utility are valid JSON strings.
Logger emitting valid JSON strings
Before:
2022-04-08T10:58:44.811Z b6511ee9-4873-404e-b60c-a23cb45d3ff2 INFO {"cold_start":false,"function_arn":"arn:aws:lambda:eu-west-2:12345:function:test","function_memory_size":1024,"function_name":"test","function_request_id":"b6511ee9-4873-404e-b60c-a23cb45d3ff2","level":"INFO","message":"test message","service":"test","timestamp":"2022-04-08T10:58:44.811Z"}
After:
{"cold_start":false,"function_arn":"arn:aws:lambda:eu-west-2:12345:function:test","function_memory_size":1024,"function_name":"test","function_request_id":"b6511ee9-4873-404e-b60c-a23cb45d3ff2","level":"INFO","message":"test message","service":"test","timestamp":"2022-04-08T10:58:44.811Z"}
As detailed in the AWS Lambda docs:
The Node.js runtime logs the START, END, and REPORT lines for each invocation. It adds a timestamp, request ID, and log level to each entry logged by the function.
This behaviour is handy for those who have not adopted structured logging and that are using Amazon CloudWatch to store their logs as it adds context to each log entry without any extra code in the function.
For those who instead prefer to bring their logs elsewhere, and have decided to use JSON to format their logs, the presence of the prefix makes it harder to ingest and process the logs.
Starting with this release all the logs emitted by Logger won't have the prefix and will instead be a valid JSON that can be parsed as such.
Big shoutout to @olanb7 for reporting this on the #lambda-powertools
channel part of the AWS Developers Slack (Join here!)
Changes
🐛 Bug and hot fixes
- fix(logger): change logging to use stdout (#748) by @dreamorosi
🔧 Maintenance
- build(deps): bump constructs from 10.0.112 to 10.0.113 (#765) by @dependabot
- build(deps-dev): bump esbuild from 0.14.34 to 0.14.36 (#761) by @dependabot
- build(deps): bump aws-sdk from 2.1111.0 to 2.1113.0 (#764) by @dependabot
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.18.0 to 5.19.0 (#763) by @dependabot
- build(deps): bump constructs from 10.0.110 to 10.0.112 (#760) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.18.0 to 5.19.0 (#759) by @dependabot
- build(deps): bump @aws-sdk/client-sts from 3.58.0 to 3.67.0 (#758) by @dependabot
- build(deps-dev): bump typedoc from 0.22.14 to 0.22.15 (#757) by @dependabot
- build(deps): bump constructs from 10.0.108 to 10.0.110 (#754) by @dependabot
- build(deps-dev): bump eslint from 8.12.0 to 8.13.0 (#755) by @dependabot
- build(deps): bump aws-actions/stale-issue-cleanup from e9f9e34 to 5 (#753) by @dependabot
- build(deps): bump aws-sdk from 2.1110.0 to 2.1111.0 (#756) by @dependabot
- build(deps): bump actions/upload-artifact from 2 to 3 (#752) by @dependabot
- build(deps-dev): bump concurrently from 7.0.0 to 7.1.0 (#746) by @dependabot
This release was made possible by the following contributors:
v0.8.0
Summary
This release adds a new feature to the Tracer utility that allows you to automatically capture traces for HTTP requests without changing your code.
Capturing HTTP requests with Tracer
You can now use Tracer to capture requests to HTTP APIs. The utility automatically traces those calls and adds the API to the service graph as a downstream service.
Tracer patches the http
and https
modules from the standard library. This means that request libraries that are based on one of these modules should be instrumented automatically.
The service graph shown in the screenshot above was generated using the popular axios
library:
import { Tracer } from '@aws-lambda-powertools/tracer';
import axios from 'axios';
const tracer = new Tracer({ serviceName: 'serverlessAirline' });
export const handler = async (event: unknown, context: Context): Promise<void> => {
await axios.get('https://httpbin.org/status/200');
};
Translating to the following traces:
The feature is enabled by default and HTTP requests should be automatically start being traced once you upgrade @aws-lambda-powertools/tracer
to v0.8.0
or above.
You can opt-out by setting the POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS
environment variable to false
or by passing the captureHTTPSRequests: false
option to the Tracer constructor:
const tracer = new Tracer({
serviceName: 'serverlessAirline',
captureHTTPSRequests: false // Tracer won't capture any trace for your HTTP requests
});
Changes
🌟New features and non-breaking changes
- feat: added captureHTTPsRequest feature (#677) by @dreamorosi
🔧 Maintenance
- build(deps): bump aws-sdk from 2.1109.0 to 2.1110.0 (#744) by @dependabot
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.17.0 to 5.18.0 (#743) by @dependabot
- build(deps): bump aws-cdk-lib from 2.19.0 to 2.20.0 (#742) by @dependabot
- build(deps-dev): bump @aws-cdk/cloudformation-diff from 2.19.0 to 2.20.0 (#741) by @dependabot
- build(deps-dev): bump cdk-assets from 2.19.0 to 2.20.0 (#740) by @dependabot
- build(deps-dev): bump eslint-plugin-import from 2.25.4 to 2.26.0 (#739) by @dependabot
- build(deps-dev): bump @aws-cdk/cx-api from 2.19.0 to 2.20.0 (#738) by @dependabot
- build(deps-dev): bump typedoc from 0.22.13 to 0.22.14 (#737) by @dependabot
- build(deps): bump constructs from 10.0.102 to 10.0.108 (#735) by @dependabot
- build(deps-dev): bump esbuild from 0.14.29 to 0.14.34 (#734) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.17.0 to 5.18.0 (#725) by @dependabot
- build(deps-dev): bump eslint-import-resolver-typescript from 2.7.0 to 2.7.1 (#720) by @dependabot
- build(deps): bump aws-sdk from 2.1105.0 to 2.1109.0 (#736) by @dependabot
- build(deps-dev): bump @aws-sdk/client-dynamodb from 3.55.0 to 3.58.0 (#719) by @dependabot
This release was made possible by the following contributors:
v0.7.2
Summary
This is a maintenance release in which we have bumped several development dependencies. Our work on improving the confidence of our tests continues, we have extended our test matrix to more utilities as well as completely migrate the setup of the integration tests to aws-cdk-lib
.
📜 Documentation updates
- build(docs): updated docs dependencies (#688) by @dreamorosi
🔧 Maintenance
- build(deps-dev): bump cdk-assets from 2.18.0 to 2.19.0 (#718) by @dependabot
- build(deps): bump aws-sdk from 2.1104.0 to 2.1105.0 (#716) by @dependabot
- build(deps-dev): bump @aws-cdk/cx-api from 2.18.0 to 2.19.0 (#715) by @dependabot
- build(deps): bump aws-cdk-lib from 2.18.0 to 2.19.0 (#714) by @dependabot
- build(deps-dev): bump @aws-cdk/cloudformation-diff from 2.18.0 to 2.19.0 (#713) by @dependabot
- build(deps): bump constructs from 10.0.101 to 10.0.102 (#712) by @dependabot
- build(dev-deps): bump @types/jest (#717) by @dreamorosi
- build(dev-deps): bump jest in examples to latest (#711) by @dreamorosi
- build(deps): bump aws-cdk-lib from 2.17.0 to 2.18.0 (#710) by @dependabot
- build(deps): bump constructs from 10.0.92 to 10.0.101 (#709) by @dependabot
- build(deps-dev): bump eslint from 8.11.0 to 8.12.0 (#708) by @dependabot
- build(deps-dev): bump cdk-assets from 2.17.0 to 2.18.0 (#703) by @dependabot
- build(deps-dev): bump @aws-cdk/cloudformation-diff from 2.17.0 to 2.18.0 (#705) by @dependabot
- build(deps-dev): bump @aws-cdk/cx-api from 2.17.0 to 2.18.0 (#702) by @dependabot
- build(deps-dev): bump ts-jest from 27.1.3 to 27.1.4 (#706) by @dependabot
- build(deps): bump @aws-sdk/client-sts from 3.53.0 to 3.58.0 (#707) by @dependabot
- build(deps-dev): bump eslint-import-resolver-typescript from 2.5.0 to 2.7.0 (#701) by @dependabot
- build(deps-dev): bump @commitlint/cli from 16.2.1 to 16.2.3 (#704) by @dependabot
- build(deps-dev): bump jest-runner-groups from 2.1.0 to 2.2.0 (#700) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.14.0 to 5.17.0 (#699) by @dependabot
- build(deps-dev): bump typescript from 4.6.2 to 4.6.3 (#698) by @dependabot
- build(deps): bump aws-sdk from 2.1092.0 to 2.1104.0 (#697) by @dependabot
- build(deps-dev): bump esbuild from 0.14.26 to 0.14.29 (#696) by @dependabot
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.14.0 to 5.17.0 (#693) by @dependabot
- build(deps-dev): bump @types/node from 17.0.21 to 17.0.23 (#685) by @dependabot
- build(deps): bump hosted-git-info from 4.1.0 to 5.0.0 (#680) by @dependabot
- build(docs): updated docs dependencies (#688) by @dreamorosi
- build(deps): bump minimist from 1.2.5 to 1.2.6 in /examples/cdk (#686) by @dependabot
- build(deps): bump minimist from 1.2.5 to 1.2.6 (#687) by @dependabot
- test(common,logger,metrics): run e2e tests for metrics in both Node runtimes (#678) by @ijemmy
- test(all): move e2e tests to cdk v2 (#676) by @flochaz
This release was made possible by the following contributors:
@dreamorosi, @flochaz and @ijemmy
v0.7.1
Summary
This release introduces a number of improvements around our E2E tests and documentation.
@AWSDB addresses the issue of the AWS Lambda function invocation mode in the E2E tests for the Logger package.
Previously, multiple function invocations have always been performed in parallel. However, this made all the cold start checks impossible, because parallel invocations cause multiple cold starts.
The invokeFunction helper function now has an additional optional parameter invocationMode with allowed options PARALLEL
or SEQUENTIAL
. This parameter lets the invokers control how to call the function-under-test.
invocationLogs = await invokeFunction(functionName, 2, 'SEQUENTIAL');
Another improvement introduced by @AWSDB is aligning the implementation of the Logger to other AWS Lambda Powertools flavors like e.g. Python when it comes to log parameters.
Now developers can write logs also in this format:
// 6) simple string
logger.info('This is the message value', 'Additional string value');
Additionally:
- passing multiple objects is restricted to only { key: 'value' } (key-value) kind of ones
- in general, passing arrays and other unknown objects is not supported anymore (BREAKING)
- passing multiple strings and Errors is not supported anymore (BREAKING)
Documentation improvements include adding a Table of Content in Github's README and CONTRIBUITING files by @ijemmy, and add mermaid diagrams support by @dreamorosi.
Changes
📜 Documentation updates
- docs(all): add toc to README.md and CONTRIBUTING.md (#623) by @ijemmy
- docs: fixed naming notes (#642) by @dreamorosi
- build(dev-deps): add mermaid plugin to docs (#641) by @dreamorosi
🐛 Bug and hot fixes
- fix(logger): enable sequential invocation in e2e test (#658) by @AWSDB
- fix(logger): fix handling of additional log keys (#614) by @AWSDB
🔧 Maintenance
- build(dev-deps): add mermaid plugin to docs (#641) by @dreamorosi
- build(deps-dev): bump esbuild from 0.14.25 to 0.14.26 (#659) by @dependabot
- build(deps-dev): bump eslint from 8.10.0 to 8.11.0 (#661) by @dependabot
- build(deps): bump aws-cdk-lib from 2.15.0 to 2.16.0 (#660) by @dependabot
- build(deps): bump aws-sdk from 2.1089.0 to 2.1092.0 (#655) by @dependabot
- build(deps): bump release-drafter/release-drafter from 5.18.1 to 5.19.0 (#656) by @dependabot
- build(deps): bump constructs from 10.0.82 to 10.0.87 (#657) by @dependabot
- fix(tracer, metrics): use polling instead of fixed wait in e2e tests (#654) by @AWSDB
- build(deps): bump aws-sdk from 2.1088.0 to 2.1089.0 (#645) by @dependabot
- build(deps): updated dependencies in examples (#643) by @dreamorosi
This release was made possible by the following contributors:
@AWSDB, @dependabot, @dependabot[bot], @dreamorosi and @ijemmy
v0.7.0
Summary
This release continues our efforts of reducing code duplication across utilities and brings a number of housekeeping changes on documentation and configurations.
Starting from this release all the three core utilities (Logger
#550, Metrics
#548, and Tracer
#549) are now using the new cold start heuristic introduced in commons
in the previous release. In addition to reducing the code surface to maintain this also reduces the size of the deployment package for those using two or more utilities in their AWS Lambda functions.
Along the same lines, this release also converts @types/aws-lambda
in the commons
to a devDependency
, continuing our efforts to remove unnecessary code from the deployment packages of our customers using AWS Lambda Powertools.
This release also sees three first-time contributors: @AWSDB, @SH4DY, and @goverdhan07 who have helped improving the documentation and the experience for other contributors 🎉
Changes
🌟New features and non-breaking changes
- feat(logger): adopted Utility class & updated unit tests (#550) by @dreamorosi
- feat(tracer): adopted Utility class & updated unit tests (#549) by @dreamorosi
- feat(metrics): adopted Utility class (#548) by @dreamorosi
🌟 Minor Changes
- docs: Add usage sub-section in docs (#604) by @dreamorosi
- feat(logger): adopted Utility class & updated unit tests (#550) by @dreamorosi
- feat(tracer): adopted Utility class & updated unit tests (#549) by @dreamorosi
- feat(metrics): adopted Utility class (#548) by @dreamorosi
📜 Documentation updates
- docs: updated project names to aws lambda power tools for typescript (#628) by @goverdhan07
- docs: Add usage sub-section in docs (#604) by @dreamorosi
- docs: improve CONTRIBUTING.md (#618) by @AWSDB
- docs: added summary section to contributing docs (#573) by @dreamorosi
🔧 Maintenance
- build(deps): bump aws-cdk-lib from 2.14.0 to 2.15.0 (#611) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.13.0 to 5.14.0 (#640) by @dependabot
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.13.0 to 5.14.0 (#639) by @dependabot
- build(deps-dev): bump typedoc from 0.22.12 to 0.22.13 (#637) by @dependabot
- build(deps-dev): bump typescript from 4.5.5 to 4.6.2 (#635) by @dependabot
- build(deps): bump constructs from 10.0.74 to 10.0.82 (#634) by @dependabot
- build(deps): bump aws-sdk from 2.1084.0 to 2.1088.0 (#633) by @dependabot
- build(deps): bump actions/checkout from 2 to 3 (#632) by @dependabot
- build(deps-dev): bump ts-node from 10.6.0 to 10.7.0 (#631) by @dependabot
- build(deps-dev): bump esbuild from 0.14.23 to 0.14.25 (#625) by @dependabot
- chore(examples/cdk): Unpin CDK CLI in devDependencies of CDK examples (#615) by @SH4DY
- build(dev-deps): consolidate all common dev deps in workspaces (#605) by @dreamorosi
- build(deps): bump @aws-sdk/client-sts from 3.52.0 to 3.53.0 (#595) by @dependabot
- build(deps): bump constructs from 10.0.70 to 10.0.74 (#601) by @dependabot
- build(deps): bump actions/setup-python from 2.3.2 to 3 (#599) by @dependabot
- build(deps): bump aws-cdk-lib from 2.13.0 to 2.14.0 (#603) by @dependabot
- build(deps): bump actions/setup-node from 2 to 3 (#600) by @dependabot
- build(deps-dev): bump esbuild from 0.14.x to 0.14.23 (#589) by @dreamorosi
- build(deps): bump @aws-sdk/client-sts from 3.48.0 to 3.52.0 (#586) by @dependabot
- build(deps): bump actions/github-script from 5 to 6 (#553) by @dependabot
- build(deps): bump constructs from 10.0.16 to 10.0.70 (#579) by @dependabot
- build(deps): bump aws-cdk-lib from 2.0.0 to 2.13.0 (#582) by @dependabot
- chore: updated dependencies (#569) by @dreamorosi
- chore: update actions to npm8 (#570) by @dreamorosi
- improv: github issues template, RFC added (#572) by @saragerion
- build(deps): bump vm2 from 3.9.5 to 3.9.7 in /examples/cdk (#555) by @dependabot
- build(deps): bump vm2 from 3.9.5 to 3.9.7 in /packages/logger (#556) by @dependabot
This release was made possible by the following contributors:
@SH4DY, @AWSDB, @dreamorosi, @goverdhan07, @ijemmy and @saragerion
v0.6.0
Summary
This small release fixes a bug on Logger utility that the context information (doc) and persistent log attributes (doc) aren't updated correctly between requests. This led to the same awsRequestId
getting logged multiple times for different requests. Thanks @okoskine for your contribution.
There is no API change in this release. The rest of the changes are all housekeeping (e2e tests and reduce code duplication).
Changes
🌟New features and non-breaking changes
- feat(commons): centralize cold start heuristic (#547) by @dreamorosi
- feat(logger): add e2e tests for logger (#529) by @ijemmy
🌟 Minor Changes
- feat(commons): centralize cold start heuristic (#547) by @dreamorosi
📜 Documentation updates
- docs(theme): upgrade mkdocs material to 8.x (#534) by @dreamorosi
🐛 Bug and hot fixes
🔧 Maintenance
- chore(all): Switch to use only eu-west-1 in tests and doc (#562) by @ijemmy
- chore(all): add a PR checklist item to update examples (#560) by @ijemmy
- chore(logger): make Logger E2E works for all runtimes (#559) by @ijemmy
- docs(theme): upgrade mkdocs material to 8.x (#534) by @dreamorosi
This release was made possible by the following contributors:
@dreamorosi, @ijemmy and @okoskine
v0.5.1
Summary
This small release mainly fixes a bug introduced in the previous version. The bug, described in detail in this issue (#524), made it so that when patching an AWS.DynamoDB.DocumentClient
with Tracer
the returned AWS SDK client would be an instance of AWS.DynamoDB
instead. We have corrected the bug and tightened our unit & integration tests around the feature to catch any potential regression around this feature in future iterations.
The rest of the changes are all housekeeping related to internal tooling, thanks @saragerion for taking care of that!
Changes
- Revert "build(deps-dev): bump aws-cdk from 1.139.0 to 1.143.0" (#544) by @saragerion
- Revert "build(deps-dev): bump @aws-cdk/aws-lambda-nodejs from 1.139.0 to 1.143.0" (#545) by @saragerion
🐛 Bug and hot fixes
- fix(tracer): properly return DynamoDB.DocumentClient (#528) by @dreamorosi
🔧 Maintenance
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.9.1 to 5.11.0 (#539) by @dependabot
- build(deps-dev): bump @typescript-eslint/parser from 5.9.1 to 5.11.0 (#538) by @dependabot
- build(deps-dev): bump aws-cdk from 1.139.0 to 1.143.0 (#532) by @dependabot
- build(deps-dev): bump @aws-cdk/aws-lambda-nodejs from 1.139.0 to 1.143.0 (#531) by @dependabot
- build(deps): bump actions/setup-python from 2.3.1 to 2.3.2 (#537) by @dependabot
- build(deps): bump release-drafter/release-drafter from 5.17.6 to 5.18.1 (#536) by @dependabot
- build(deps-dev): bump eslint from 8.6.0 to 8.8.0 (#526) by @dependabot
This release was made possible by the following contributors:
v0.5.0
Summary
With this version we have made @middy/core
an opt-in dependency only for those who want to use the middleware pattern. This allows other users who prefer decorators or classic functions to avoid bundling an unnecessary dependency. This is a breaking change and if you were using one of the Middy middleware in Powertools you should now make sure to add @middy/core
to your package.json
file.
Another small DX improvement that comes from a community feedback is the ability to trace DynamoDB's DocumentClient
just like any other aws-sdk
client:
Before
After
Additionally we have also been doing some work to improve our contributing guidelines and documenting our development setup (#492, #485).
Changes
🌟New features and non-breaking changes
- feat(all): make
@middy/core
optional (#511) by @dreamorosi - feat(tracer): add support for capturing DynamoDB DocumentClient (#450) by @dreamorosi
- feat: Add codespaces/gitpod support (#485) by @michaelbrewer
🌟 Minor Changes
- feat(tracer): add support for capturing DynamoDB DocumentClient (#450) by @dreamorosi
📜 Documentation updates
- docs: improve dev setup & contributing info (#492) by @dreamorosi
🐛 Bug and hot fixes
- fix(examples): fix errors in logger and metrics examples (#509) by @michaelbrewer
- build(all): add concurrency to github workflows (#499) by @saragerion
- fix(logger|metrics): return decorated class (#489) by @dreamorosi
🔧 Maintenance
- feat(all): make
@middy/core
optional (#511) by @dreamorosi - build(deps): bump aws-actions/configure-aws-credentials from 1.6.0 to 1.6.1 (#503) by @dependabot
- build(deps): bump release-drafter/release-drafter from 5.15.0 to 5.17.6 (#504) by @dependabot
- build(deps-dev): bump @types/node from 17.0.8 to 17.0.10 (#488) by @dependabot
- build(deps-dev): bump typescript from 4.5.4 to 4.5.5 (#507) by @dependabot
- build(deps): bump @aws-sdk/client-sts from 3.46.0 to 3.48.0 (#505) by @dependabot
- build(deps): bump aws-sdk from 2.1056.0 to 2.1062.0 (#506) by @dependabot
- chore(examples): fix version bumping of examples (#498) by @flochaz