Skip to content

Releases: Ptrskay3/axum-prometheus

0.7.0

20 Jul 09:58
7c46c0b
Compare
Choose a tag to compare

Changed

  • MakeDefaultHandle::make_default_handle now takes self as argument. This allows custom implementor structs to hold non-static data. [#49]
  • Change the default initialization of PrometheusHandle to prevent unbounded memory growth of histograms. [#52]
  • Bump metrics to 0.23, metrics-exporter-prometheus to 0.15. [#52]
  • Document MSRV as 1.70 currently. [#52]

Added

  • GenericMetricLayer::pair_from to initialize from a concrete struct. GenericMetricLayer::pair now requires that the handle type implements Default. [#49]
  • BaseMetricLayer that serves a more lightweight alternative to GenericMetricLayer. [#56]

What's Changed

New Contributors

Full Changelog: 0.6.1...0.7.0

0.6.1

23 Jan 20:17
9a9a672
Compare
Choose a tag to compare
  • Disabled the "push-gateway" feature in metrics-exporter-prometheus by default, and added a way to enable it via
    the same name under axum_prometheus. This change ensures that this crate can still be built without openssl support, see here. [#44]
  • Update examples to metrics-exporter-prometheus to 0.13 and metrics to 0.22. [#43]

0.6.0

22 Jan 08:09
c157634
Compare
Choose a tag to compare
  • Update metrics-exporter-prometheus to 0.13 and metrics to 0.22 #39

0.5.0

27 Nov 10:44
4601af8
Compare
Choose a tag to compare

Added

  • Support for response body size metric, which can be turned on via PrometheusMetricLayerBuilder::enable_response_body_size. [#33]
  • All metrics now are initialized via the metrics::describe_* functions by default, but can be turned off with PrometheusMetricLayerBuilder::no_initialize_metrics if you wish to do it manually. [#33]
  • Compatibility with http-body = "1.0" and axum = "0.7". [#36]

Changed

  • The lower-level Lifecycle API has changed: separated the OnBodyChunk trait, which is ran when a response body chunk has been generated. [#33]

0.4.0

24 Jul 12:58
7aa4605
Compare
Choose a tag to compare

Added

  • Support for different exporters than Prometheus. Developers now allowed to use their own exporter - as long as it's using the metrics.rs ecosystem. This is meant to be a non-breaking change - if you're using Prometheus, you shouldn't notice any changes in the public API. If you do however, please file an issue! #28
  • An example showcasing StatsD exporter #28
  • Simple snapshot tests #28
  • Utility functions to get metric names at runtime #28

Fixed

  • Previous attempts to fix PrometheusMetricBuilder::with_prefix in 0.3.4 were not complete, this is now fully addressed. #28

0.3.4

16 Jul 09:18
b91b74d
Compare
Choose a tag to compare

Fixed

  • PrometheusMetricBuilder::with_prefix is now properly setting the metric prefix, and the metric handle also takes that prefix into account. Previously the metric initialization incorrectly ignored the prefix, which caused the requests duration histogram to use quantile instead of le labels. [#26]. (Thanks @yanns!)

0.3.3

02 May 07:45
da7630a
Compare
Choose a tag to compare
  • Update metrics-exporter-prometheus to 0.12 and metrics to 0.21.

0.3.2

25 Mar 10:30
abb27a4
Compare
Choose a tag to compare

Added

  • The status code of the response is now captured in the total requests counter metric. [#13] (Thanks @rthomas!)

0.3.1

16 Feb 07:48
3c65efa
Compare
Choose a tag to compare

Added:

  • with_prefix to PrometheusMetricLayerBuilder, which can be used to rename the default prefix (axum) for all metrics. This is especially useful when working with cargo workspaces that has more than one axum_prometheus instance. (Thanks @rthomas!)

0.3.0

04 Jan 11:23
Compare
Choose a tag to compare
  • Routing patterns can be ignored, and grouped together when reporting to Prometheus. Added PrometheusMetricLayerBuilder to easily customize these. [#5]
  • Endpoint label behavior can be altered with the new EndpointLabel enum. [#8]
  • The metric names can be changed by setting some environmental variables at compile time. [#6] (Thanks @dylanwh.)