Skip to content

Releases: aws-powertools/powertools-lambda-java

v1.7.1

06 Jul 13:43
0eec650
Compare
Choose a tag to compare

Changes

This release fixes static code analysis violations identified using spotbugs. For future, these checks are now part of our build workflows as well, making sure none of these issues slips through in any of the future releases.

This release was made possible by the following contributors:

@pankajagrawal16

v1.7.0

05 Jul 12:09
aad936f
Compare
Choose a tag to compare

Changes

Logging

  • You can now inject correlation IDs coming from any Event Source using Json Pointer expressions, or by manually injecting a string with setCorrelationId() in LoggingUtils.

image

  • As we initialize Logger in the global scope, logging state can persist across invocations. It is a good practice to always append new keys and use default values, so Logger can update and remove keys on a per invocation basis. However, sometimes you might add keys conditionally depending on the incoming event. For these type of use cases, you can now use clearState attribute on @Logging annotation.

image

This release was made possible by the following contributors:

@pankajagrawal16

v1.6.0

21 Jun 07:52
48f22ea
Compare
Choose a tag to compare

Changes

Added

  • Tracing: Support for Boolean and Number type as value in TracingUtils.putAnnotation()
  • Logging: API to remove any additional custom key from logger entry using LoggingUtils.removeKeys()

Maintenance

  • deps: Bump third party dependencies to the latest versions.

This release was made possible by the following contributors:

@dmahapatro, @msailes, @pankajagrawal16 and @sullis

v1.5.0

31 Mar 08:03
0db2903
Compare
Choose a tag to compare

Changes

Metrics

  • Ability to set multiple dimensions as default dimensions via MetricsUtils.defaultDimensions().
    Introduced in v1.4.0, MetricsUtils.defaultDimensionSet() is deprecated now for better user experience.

This release was made possible by the following contributors:

@pankajagrawal16

v1.4.0

11 Mar 14:01
edbc105
Compare
Choose a tag to compare

Changes

Metrics

  • Removed validation of having minimum one dimension to capture metrics. EMF now support Dimension set being empty as well.

  • Now Customers have ability to set default dimension for metrics via MetricsUtils.defaultDimensionSet(). This is will be automatically applied to any metrics captured via @Metrics annotation as well as withSingleMetric api calls.

image

This release was made possible by the following contributors:

@pankajagrawal16

v1.3.0

05 Mar 13:45
087e691
Compare
Choose a tag to compare

Changes

Powertools now works out of the box with code guru profile handler implementation.

Metrics:

  • Module now by default captures AWS Request id as property if used together with Metrics annotation. It will also capture Xray Trace ID as property if tracing is enabled. This ensures good observability and tracing.

  • withSingleMetric from MetricsUtils can now pick the default namespace specified either on Metrics annotation or via POWERTOOLS_METRICS_NAMESPACE env var, without need to specify explicitly for each call.

  • Metrics annotation captures metrics even in case of unhandled exception from Lambda function.

Logging:

  • Ability to override object mapper used for logging event. This provides customers ability to customize how and what they want to log from event.

image

📜 Documentation updates

This release also marks our documentation system migration from Gatsby to MKdocs, including navigation improvements to address customers feedback.

image

This release was made possible by the following contributors:

@michaelbrewer, @msailes and @pankajagrawal16

v1.2.0

13 Jan 11:28
6af64f0
Compare
Choose a tag to compare

Changes

  • Now you can change the default mode of @Tracing annotation via environment variables. Previously, default behavior of annotation was to capture both response and error from the method calls. With this release, users can configure this default behavior via environment variables. Existing attributes captureResponse and captureError are deprecated in favor of captureMode attribute on @Tracing annotation. Ref issue #231 for more details.

image

image

  • Users can also define custom segment names on @Tracing annotation. Kudos to @Skipua for contribution

image

  • feat: support for env variable in tracing capture modes (#249) by @pankajagrawal16
  • feat: custom segment names (#221) by @Skipua
  • ci: add JDK 15 to build matrix (#210) by @sullis
  • ci: add .github/workflows to CI build.yml (#211) by @sullis
  • refactor: replace Apache Commons Logging with SLF4J (#212) by @sullis
  • build(deps): bump software.amazon.awssdk:bom from 2.15.38 to 2.15.39 (#207) by @dependabot

📜 Documentation updates

This release was made possible by the following contributors:

@Skipua, @heitorlessa, @pankajagrawal16 and @sullis

v1.1.0

03 Dec 09:49
a9fbf8b
Compare
Choose a tag to compare

Changes

  • Annotation support for fetching keys and secrets from your favorite store. You can make use of the annotation @param to inject a parameter value in a variable.

By default it will use SSMProvider to retrieve the value from AWS System Manager Parameter Store.
You can always create your own provider based on where your keys or secrets are stored by extending BaseProvider and/or a Transformer.

image

  • Not directly related to this release, but now you can use preconfigured templates with lambda powertools core utilities pre configured. You can use it to initialize AWS SAM projects.

image

📜 Documentation updates

This release was made possible by the following contributors:

@vitodegiosa @pankajagrawal16 and @heitorlessa

v1.0.1

26 Nov 17:15
8ffa054
Compare
Choose a tag to compare

Changes

This release adds some performance improvement to parameters utility when fetching params using default SSM/Secret manager client.

Docs are also updated with official blog link and also fixes broken links to github.

This release was made possible by the following contributors:

@pankajagrawal16, @stevehouel

v1.0.0

04 Nov 14:08
154e87a
Compare
Choose a tag to compare

Changes

With this release, we move from beta to General Availability 🎉🎉🎉!

Quick links: 📜Documentation | Maven | Feature request | Bug Report | Detailed blog post

image

Tracing

Provides a simple way to send traces from functions to AWS X-Ray. It provides visibility into function calls, interactions with other AWS services, or external HTTP requests. You can add annotations to traces to allow filtering based on key information. For example, when using @Tracing, it creates a ColdStart annotation for you. You can easily group and analyze traces where there was an initialization overhead.

image

Logging

Based on log4j2, outputs structured JSON. It allows you to pass in strings, or more complex objects, and takes care of serializing the log output. Common use cases—such as logging the Lambda event payload and capturing cold start information—are handled for you. You can also include your own custom keys to the logger at any time.

image

Metrics

Makes collecting custom metrics from your application simple, without the need to make synchronous requests to external systems. This functionality, which is powered by Amazon CloudWatch Embedded Metric Format (EMF), allows for capturing metrics asynchronously. Again, convenient functionality provides for common cases, such as validating metrics against CloudWatch EMF specification and tracking cold starts.

image

Helper utilities

Utilities removes most of the heavy lifting that customers have to do across a wide range of use cases. New utilities get added based on community feedback. If you have an idea, feel free to open an RFC. Some of the utilities already made available as part of GA:

image

image

image

image

Sample projects using Powertools Java

🧐What's New for Beta customers

If you've been following the Beta, GA version is released with all the functionalities in our latest beta release v0.6.0-beta

Breaking changes from v0.6.0-beta to GA:

We have renamed some of the annotations to make it more concise and consistent in usage. Refer this issue for more details.

Beta GA
PowertoolsTracing Tracing
PowertoolsLogging Logging
PowertoolsMetrics Metrics
LargeMessageHandler SqsLargeMessage
SqsBatchProcessor SqsBatch

All the functionality remains the same. So for beta customers, it should be just about fixing to correct imports.