diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ee12d3..e175946 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,21 @@ All notable changes to this project will be documented in this file. -## [Unreleased] +# [Unreleased] + +- + +# [0.5.0] - 2023-11-27 ### Added -- Support for response body size metric, which can be turned on via `PrometheusMetricLayerBuilder::enable_response_body_size`. -- All metrics now are initialized via `metrics::describe_*` function by default, but can be turned off with `PrometheusMetricLayerBuilder::no_initialize_metrics`. +- Support for response body size metric, which can be turned on via `PrometheusMetricLayerBuilder::enable_response_body_size`. [\#33] +- All metrics now are initialized via `metrics::describe_*` function by default, but can be turned off with `PrometheusMetricLayerBuilder::no_initialize_metrics`. [\#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. +- 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] - 2023-07-24 @@ -98,4 +103,5 @@ First version. [0.3.3]: https://github.com/Ptrskay3/axum-prometheus/compare/release/0.3.2...release/0.3.3 [0.3.4]: https://github.com/Ptrskay3/axum-prometheus/compare/release/0.3.3...release/0.3.4 [0.4.0]: https://github.com/Ptrskay3/axum-prometheus/compare/release/0.3.4...release/0.4.0 +[0.5.0]: https://github.com/Ptrskay3/axum-prometheus/compare/release/0.4.0...release/0.5.0 [\#28]: https://github.com/Ptrskay3/axum-prometheus/pull/28 diff --git a/Cargo.toml b/Cargo.toml index df9681a..d5bc61b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "axum-prometheus" -version = "0.4.0" +version = "0.5.0" edition = "2021" homepage = "https://github.com/Ptrskay3/axum-prometheus" license = "MIT" diff --git a/README.md b/README.md index 53d78ad..7b4d065 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ AXUM_HTTP_RESPONSE_BODY_SIZE = "my_app_response_body_size" | ------------ | ------------- | | `0.5` | `0.1` | | `0.6` | `0.2`, `0.3`, `0.4` | +| `0.7` | `0.5` | ## Usage @@ -62,7 +63,7 @@ Add `axum-prometheus` to your `Cargo.toml`. ```toml [dependencies] -axum-prometheus = "0.4.0" +axum-prometheus = "0.5.0" ``` Then you instantiate the prometheus middleware: @@ -121,7 +122,7 @@ axum_http_requests_duration_seconds_count{method="GET",status="200",endpoint="/m This crate may be used with other exporters than Prometheus. First, disable the default features: ```toml -axum-prometheus = { version = "0.4.0", default-features = false } +axum-prometheus = { version = "0.5.0", default-features = false } ``` Then implement the `MakeDefaultHandle` for the provider you'd like to use. For `StatsD`: diff --git a/src/lib.rs b/src/lib.rs index bcbac9e..1f9694c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,7 +37,7 @@ //! Add `axum-prometheus` to your `Cargo.toml`. //! ```not_rust //! [dependencies] -//! axum-prometheus = "0.4.0" +//! axum-prometheus = "0.5.0" //! ``` //! //! Then you instantiate the prometheus middleware: @@ -93,7 +93,7 @@ //! This crate may be used with other exporters than Prometheus. First, disable the default features: //! //! ```toml -//! axum-prometheus = { version = "0.4.0", default-features = false } +//! axum-prometheus = { version = "0.5.0", default-features = false } //! ``` //! //! Then implement the `MakeDefaultHandle` for the provider you'd like to use. For `StatsD`: