Releases: aws-powertools/powertools-lambda-java
v1.7.3
Changes
With this release, If you want certain exceptions to be treated as permanent failures during batch processing, i.e. exceptions where the result of retrying will always be a failure and want these can be immediately moved to the dead letter queue associated to the source SQS queue, you can use SqsBatch#nonRetryableExceptions()
to configure such exceptions.
- docs(batch-processing): Support for moving non retryable msg to DLQ (#531) by @pankajagrawal16
- feat(batch-processing): move non retry-able message to DLQ (#500) by @pankajagrawal16
- fix: reset cold start only when placed on handler (#508) by @pankajagrawal16
This release was made possible by the following contributors:
v1.7.2
Changes
-
Powertools All Modules: Upgrade to the latest(1.14.0) aspectj-maven-plugin which also supports Java 9 and newer versions.
Users no longer need to depend on com.nickwongdev as a workaround. #489 -
Logging: Performance optimisation to improve cold start. #484
-
SQS Batch processing/Large message: Module now lazy loads default SQS client. #484
- chore: Logging and SQS utility Optimisations (#484) by @pankajagrawal16
- Fix imports @logging after upgrade (#479) by @drissamri
This release was made possible by the following contributors:
v1.7.1
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.
- Static analysis spotbugs (#458) by @pankajagrawal16
This release was made possible by the following contributors:
v1.7.0
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()
inLoggingUtils
.
- 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.
- feat: Clear logger state (#453) by @pankajagrawal16
- feat:Correlation id injection (#448) by @pankajagrawal16
This release was made possible by the following contributors:
v1.6.0
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.
- feat: #421 Support for Boolean and Number type as value in TracingUtils putAnnotation (#423) by @dmahapatro
- feat: logger-Remove custom keys interface (#395) by @pankajagrawal16
- Java core fix (#383) by @msailes
- core: setup-java v2 (#353) by @sullis
- chore: add JDK 16 to build matrix (#367) by @sullis
This release was made possible by the following contributors:
v1.5.0
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:
v1.4.0
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 aswithSingleMetric
api calls.
- feat: Default dimensions from powertools instead of emf library (#317) by @pankajagrawal16
This release was made possible by the following contributors:
v1.3.0
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
fromMetricsUtils
can now pick the default namespace specified either onMetrics
annotation or viaPOWERTOOLS_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.
📜 Documentation updates
This release also marks our documentation system migration from Gatsby to MKdocs, including navigation improvements to address customers feedback.
- chore: migrate docs from gatsby to mkdocs (#308) by @pankajagrawal16
- chore: consistent field names for trace and req id with logger (#309) by @pankajagrawal16
- fix: powertools specific log level env var to not conflict with the system LOG_LEVEL (#306) by @pankajagrawal16
- docs: ability to override object mapper used for logging event (#303) by @pankajagrawal16
- feat: single metric utility method to pick default namespace (#305) by @pankajagrawal16
- feat: ability to override object mapper used for logging event (#302) by @pankajagrawal16
- feat: respect code guru profile handler implementation (#304) by @pankajagrawal16
- feat: Add
function_request_id
to each EMF log. (#301) by @msailes - fix: Spotbugs issues when using Powertools(#300) @msailes
- feat: capture metrics even when handler results in exception (#286) by @pankajagrawal16
- fix(example): Update the example to v1.2.0 (#288) by @michaelbrewer
This release was made possible by the following contributors:
v1.2.0
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.
- Users can also define custom segment names on @Tracing annotation. Kudos to @Skipua for contribution
- 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
- docs: shadow sidebar to remain expanded (#208) by @heitorlessa
This release was made possible by the following contributors:
@Skipua, @heitorlessa, @pankajagrawal16 and @sullis
v1.1.0
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
.
- 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.
- doc: add reference to cookiecutter-aws-sam-powertools-java (#204) by @vitodegiosa
- feat: Parameters injection via annotations (#201) by @vitodegiosa
📜 Documentation updates
- docs: add source code link in nav bar (#199) by @heitorlessa