pypi aws-lambda-powertools 0.10.0

latest releases: 2.37.0, 2.36.0, 2.35.1...
3 years ago

Changes

This release primarily consists of changes to the Metrics core utility. Most notably:

  • The Metrics constructor now accepts a service parameter (alternatively the POWERTOOLS_SERVICE_NAME env var), as with the Tracer and Logger interfaces. This will create a default dimension named "service", with the value provided. Note that if you're already using the env var, this new dimension will start being recorded after upgrading to this version.
  • You can now specify the namespace by passing a namespace parameter to the Metrics constructor, or by supplying the POWERTOOLS_METRICS_NAMESPACE env var. This should be preferred to using the add_namespace method, which has been deprecated and will be removed in a future release.
  • To avoid repetition for the common task of recording metrics for Lambda cold starts, you can now achieve this by passing the capture_cold_start_metric parameter to the log_metrics decorator.

🌟New features and non-breaking changes

  • feat: add capture_cold_start_metric for log_metrics (#67) by @heitorlessa
  • improv: update metrics interface to resemble other core utils (#60) by @cakepietoast
  • improv: Better namespace/dimension handling for Metrics (#62) by @cakepietoast

🌟 Minor Changes

This release was made possible by the following contributors:

@cakepietoast, @danilohgds, @heitorlessa, @jfuss and @nmoutschen

Don't miss a new aws-lambda-powertools release

NewReleases is sending notifications on new releases.