Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 22, 2025

Bumps software.amazon.lambda:powertools-cloudformation from 2.4.0 to 2.5.0.

Release notes

Sourced from software.amazon.lambda:powertools-cloudformation's releases.

v2.5.0

Summary

In this release, we improve the experience with Metrics simplifying flushing metrics with a custom configuration. Additionally, we keep raising the performance bar by extending SnapStart priming to the Kafka utility.

📜 Announcement: You can now find our documentation on the official AWS documentation domain at docs.aws.amazon.com/powertools/java.

⭐️⭐️⭐️⭐️ Thanks to @​humanzz, @​kjswaruph, @​kylez-ithaka, and @​ConnorKirk for their contributions to this release!

📊 Metrics utility: New flushMetrics API

Docs

You can now flush multiple metrics at once with flushMetrics. This method gives you full control over dimensions, namespaces, and metadata before sending metrics, simplifying metrics handling for complex scenarios. In previous versions, you needed to use flushSingleMetric to emit one metric with its own setup, which limited flexibility and performance in multi-metric scenarios and required more manual management.

As before, the following inheritance rules apply for values not overwritten within the Consumer:

  • Namespace copied if not overwritten
  • Default dimensions copied if not overwritten
  • Regular dimensions not copied
  • Metadata copied

The following example shows how to emit multiple metrics in a single flush with custom dimensions, namespace, and metadata:

public class App implements RequestHandler<Object, Object> {
    private static final Metrics metrics = MetricsFactory.getMetricsInstance();
@Override
@FlushMetrics(namespace = &quot;ServerlessAirline&quot;, service = &quot;payment&quot;)
public Object handleRequest(Object input, Context context) {
    metrics.flushMetrics((customMetrics) -&gt; {
        customMetrics.addMetric(&quot;CustomMetric1&quot;, 1, MetricUnit.COUNT);
        customMetrics.addMetric(&quot;CustomMetric2&quot;, 2, MetricUnit.COUNT);
        // To optionally set a different namespace
        customMetrics.setNamespace(&quot;CustomNamespace&quot;);
        // To optionally set different default dimensions
        customMetrics.setDefaultDimensions(DimensionSet.of(&quot;CustomDefaultDimension&quot;, &quot;value&quot;));
        // To optionally append additional dimensions to (inherited) default dimensions
        customMetrics.addDimension(DimensionSet.of(&quot;CustomDimension&quot;, &quot;value&quot;));
        // To optionally add additional metadata (visible in logs only)
        customMetrics.addMetadata(&quot;CustomMetadata&quot;, &quot;value&quot;));
    });
}

}

Note: While flushSingleMetric is maintained for backwards compatibility, flushMetrics is now the recommended way to emit metrics with a custom configuration.

... (truncated)

Changelog

Sourced from software.amazon.lambda:powertools-cloudformation's changelog.

Unreleased

Documentation

  • logger: Fix logging environment variables names in documentation (#2161)

Features

  • add CRaC priming support to powertools-kafka module (#2145)
  • metrics: introduce Metrics.flushMetrics (#2154)

Maintenance

  • bump aws.sdk.version from 2.35.6 to 2.35.7 (#2190)
  • bump com.networknt:json-schema-validator from 1.5.8 to 1.5.9 (#2189)
  • bump sam/build-java21 (#2195)
  • bump squidfunk/mkdocs-material in /docs (#2194)
  • bump com.github.spotbugs:spotbugs-maven-plugin (#2192)
  • bump software.amazon.awscdk:aws-cdk-lib from 2.214.0 to 2.220.0 (#2191)
  • bump io.github.ascopes:protobuf-maven-plugin (#2193)
  • bump aws.xray.recorder.version from 2.19.0 to 2.20.0 (#2185)
  • bump aws.sdk.version from 2.33.2 to 2.33.5 (#2132)
  • bump org.apache.maven.plugins:maven-javadoc-plugin (#2186)
  • bump org.assertj:assertj-core from 3.27.4 to 3.27.6 (#2184)
  • bump aws.sdk.version from 2.34.9 to 2.35.6 (#2183)
  • bump actions/dependency-review-action from 4.8.0 to 4.8.1 (#2180)
  • bump github/codeql-action from 3.30.5 to 4.30.8 (#2179)
  • bump aws-actions/configure-aws-credentials from 5.0.0 to 5.1.0 (#2177)
  • bump com.google.protobuf:protobuf-java from 4.32.0 to 4.32.1 (#2175)
  • bump aws.sdk.version from 2.34.5 to 2.34.9 (#2174)
  • bump org.apache.commons:commons-lang3 from 3.18.0 to 3.19.0 (#2172)
  • bump org.apache.maven.plugins:maven-artifact-plugin (#2171)
  • Add User-Agent execution interceptors (#2166)
  • bump org.apache.kafka:kafka-clients from 4.0.0 to 4.1.0 (#2134)
  • bump graalvm/setup-graalvm from 1.3.6 to 1.4.1 (#2168)
  • bump ossf/scorecard-action from 2.4.2 to 2.4.3 (#2165)
  • bump squidfunk/mkdocs-material in /docs (#2164)
  • bump log4j.version from 2.25.1 to 2.25.2 (#2160)
  • bump org.apache.maven.plugins:maven-failsafe-plugin (#2159)
  • bump actions/dependency-review-action from 4.7.3 to 4.8.0 (#2158)
  • bump github/codeql-action from 3.30.1 to 3.30.5 (#2157)
  • bump io.github.ascopes:protobuf-maven-plugin from 3.9.0 to 3.10.0 (#2155)
  • bump com.amazonaws:aws-lambda-java-runtime-interface-client (#2149)
  • bump aws.sdk.version from 2.33.2 to 2.34.5 (#2156)
  • bump org.codehaus.mojo:versions-maven-plugin (#2148)
  • bump squidfunk/mkdocs-material in /docs (#2144)

... (truncated)

Commits
  • 326f4b8 chore(ci): Move tag step before changelog generation. (#2219)
  • bcda58f chore(ci): Fix sha256 formatting in git-chglog docker image reference (#2218)
  • a43da0a chore: bump org.codehaus.mojo:exec-maven-plugin from 3.5.1 to 3.6.2 (#2208)
  • 87851ce chore(ci): fix changelog generation (#2207)
  • dd7a49c Fix flaky unit tests. (#2211)
  • d0cdebd chore: bump github/codeql-action from 4.30.8 to 4.30.9 (#2209)
  • 291f2b4 chore: bump sam/build-java21 (#2201)
  • faa915b chore: bump org.sonatype.central:central-publishing-maven-plugin (#2196)
  • eeea68d chore: bump aws.sdk.version from 2.35.7 to 2.35.8 (#2197)
  • 0fa97ec chore: bump com.google.protobuf:protobuf-java from 4.32.1 to 4.33.0 (#2198)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [software.amazon.lambda:powertools-cloudformation](https://github.com/aws-powertools/powertools-lambda-java) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/aws-powertools/powertools-lambda-java/releases)
- [Changelog](https://github.com/aws-powertools/powertools-lambda-java/blob/main/CHANGELOG.md)
- [Commits](aws-powertools/powertools-lambda-java@v2.4.0...v2.5.0)

---
updated-dependencies:
- dependency-name: software.amazon.lambda:powertools-cloudformation
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Oct 22, 2025
Copy link
Owner

@docwho2 docwho2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approve Dependabot

@docwho2 docwho2 merged commit 9633e20 into main Oct 22, 2025
1 check passed
@dependabot dependabot bot deleted the dependabot/maven/software.amazon.lambda-powertools-cloudformation-2.5.0 branch October 22, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants