Skip to content

Commit

Permalink
Upgrade to prometheus 0.13 (#21)
Browse files Browse the repository at this point in the history
* Update dependencies
* Fix clippy lint
* Bump version
* Update readme
  • Loading branch information
AlexanderThaller authored Oct 18, 2021
1 parent 31d8f2d commit 18c3e47
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "prometheus_exporter"
version = "0.8.2"
version = "0.8.3"
authors = ["Alexander Thaller <alexander.thaller@trivago.com>"]

description = "Helper libary to export prometheus metrics using tiny-http."
Expand All @@ -27,12 +27,12 @@ internal_metrics = ["lazy_static"]
ascii = "1"
lazy_static = { version = "1", optional = true }
log = { version = "0.4", optional = true }
prometheus = { version = "0.12", default-features = false }
prometheus = { version = "0.13", default-features = false }
thiserror = "1"
tiny_http = { version = "0.8", default-features = false }
tiny_http = { version = "0.9", default-features = false }

[dev-dependencies]
env_logger = "0.8"
env_logger = "0.9"
log = { version = "0.4" }
rand = "0.8"
reqwest = { version = "0.11", features = ["blocking"] }
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ collecting and rendering the prometheus metrics and
through http.

**NOTICE:** You have to use the same prometheus crate version that is used by
this crate to make sure that the global registrar use by the prometheus macros
works as expected. This crate re-exports the prometheus crate to make it easier
to keep versions in sync (see examples). Currently this crate uses prometheus
version `0.11`.
this crate. This crate currently uses the metrics stored in the global registry.
A different prometheus crate will register to a different global registry. This
means that the macros used to register new metrics do not expose metrics to this
exporter.

This crate re-exports the prometheus crate to make it easier to keep versions in
sync (see examples). Currently this crate uses prometheus version `0.13`.

For information on how to migrate from an older crate version follow
[MIGRATION](/MIGRATION.md).
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ impl Server {

// Just so there are no complains about unused err variable when logging
// feature is disabled
drop(err)
drop(err);
}
}
});
Expand Down

0 comments on commit 18c3e47

Please sign in to comment.