Releases: sd2k/rocket_prometheus
Releases · sd2k/rocket_prometheus
v0.10.1
v0.10.0
This is the first release compatible with Rocket v0.5.0, and the first to make use of async
.
What's Changed
- Make fairing asynchronous by @sd2k in #4
- Add standard metrics getters by @IvashchenkoSerhii in #19
New Contributors
- @IvashchenkoSerhii made their first contribution in #19
Full Changelog: v0.9.0...v0.10.0
v0.9.0
v0.8.1
[0.8.1] - 2021-07-21
Changed
- 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.
v0.8.0
[0.8.0] - 2021-07-10
Changed
- 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.