All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.10.0-rc.1 - 2022-02-10
- Upgrade Rocket dependency to 0.5.0-rc.1, and make the fairing async.
- Remove an allocation on every request when getting the
status
label, provided the status code is between 100 and 999.
0.9.0 - 2021-10-17
- Update
prometheus
requirement to 0.13.
0.8.1 - 2021-07-21
- The two Rocket related metrics (
http_requests_total
andhttp_requests_duration_seconds
) are now stored inside a separate registry to additional metrics. This allows multiplePrometheusMetrics
fairings to exist even when using the globalprometheus::Registry
, such as the one used for metrics created by the macros in theprometheus
crate. Previously this would cause a panic because the two fairing instances would attempt to register identical metrics to the same registry, which is an error. The implication of this is that the registry returned byPrometheusMetrics::registry
no longer contains the Rocket related metrics. In practice this is unlikely to be a problem, since metrics from both registries are returned by the fairing's handler as before.
0.8.0 - 2021-07-10
- Update
prometheus
requirement to 0.12. - Add
version=0.0.4
parameter toContent-Type
header when returning metrics at the /metrics URL, as specified by the Prometheus Exposition Formats specification. - Use
Duration::as_secs_f64
instead of manually calculating nanoseconds when calculating request durations. This bumps the minimum supported Rust version to 1.38.0, which is unlikely to be a problem in practice, since Rocket still requires a nightly version of Rust. - Impl
From<PrometheusMetrics> for Vec<Route>
instead ofInto<Vec<Route>> for PrometheusMetrics
, since the former gives us the latter for free. PrometheusMetrics::registry
is now aconst fn
.- Add
PrometheusMetrics::with_default_registry
associated function, which creates a newPrometheusMetrics
using the default globalprometheus::Registry
and will therefore expose metrics created by the various macros in theprometheus
crate.
0.7.0 - 2020-06-19
- Update
prometheus
requirement to 0.10.
0.6.0 - 2020-06-19
- Don't require the default features of the
prometheus
orrocket
dependencies. This should improve compile times for crates which also don't require those features. This is a breaking change since we re-exportprometheus
(which will now have a reduced public API) but is unlikely to affect many users, since the Protobuf format has not been supported by Prometheus for some time.
0.5.0 - 2020-05-18
- Update
prometheus
requirement to 0.9.
0.4.0 - 2020-03-02
- Update
prometheus
requirement to 0.8.
0.3.2 - 2020-01-02
- Use
Instant
instead ofSystemTime
to track request durations. This should be more accurate and is infallible.
0.3.1 - 2020-01-02
- Add
PrometheusMetrics::with_registry
associated function to allow metrics to be tracked in a custom registry.
0.3.0 - 2019-06-25
- Update
prometheus
requirement to 0.7.
0.2.0 - 2019-05-08
- Re-export
prometheus
library. This re-export is the recommended way of accessing theprometheus
crate to avoid any dependency version mismatches. - Update
prometheus
requirement to 0.6.
- First version of the crate released to crates.io.