tikv / rust-prometheus

Prometheus instrumentation library for Rust applications
Apache License 2.0
1.07k stars 182 forks source link

Example in examples/example_push.rs does not compile #431

Open saleemjaffer opened 2 years ago

saleemjaffer commented 2 years ago

Describe the bug The code in examples/example_push.rs does not compile

To Reproduce Run the code in examples/example_push.rs. I ran it using cargo run --features="push"

This is the error I get:

error[E0425]: cannot find function `push_metrics` in crate `prometheus`
  --> src/main.rs:39:21
   |
39 |         prometheus::push_metrics(
   |                     ^^^^^^^^^^^^ not found in `prometheus`

error[E0422]: cannot find struct, variant or union type `BasicAuthentication` in crate `prometheus`
  --> src/main.rs:44:30
   |
44 |             Some(prometheus::BasicAuthentication {
   |                              ^^^^^^^^^^^^^^^^^^^ not found in `prometheus`

Expected behavior The code should run fine.

System information