rust-prometheus
rust-prometheus copied to clipboard
Release version 1.0
After upgrading to Rust 2018 (https://github.com/pingcap/rust-prometheus/issues/217) we can start thinking about releasing 1.0. There may be some other improvements needed as well, but let's get them started.
I would like to carry the following new features:
- type-safe labels (in length)
- optional protobuf dependency
Thanks for the feedback @breeswish! I'll ask more about them when I start this work.
Hello!
Would it be possible to release a 0.4.3 of the current master? My colleague worked on #215, and it would be great to be able to move away from a git dependancy of that commit.
Thanks! :)
@breeswish
Please release it.
Looks like we have already assigned version 0.5 because of some existing breaking change. I'm going to just release 0.5!
We have published 0.5 👏
We will work on release 1.0, carrying all nice features we want. Hope we can finish it before FOSDEM2019 XD
Per https://github.com/pingcap/rust-prometheus/issues/217 we're about ready to upgrade to 2018. From there we can add the two required features and do 1.0. Time is getting quite tight to get it out before fosdem.
@breeswish can you say more about "type-safe labels (in length)" or link to an issue explaining it?
@brson You may refer to this PR https://github.com/pingcap/rust-prometheus/tree/generic_label_size which is a prototype. The main idea is to use generics to make sure that label length provided in with_label_values() matches the label length provided when defining the metric (like Counter::with_opts).
I just thought out other things I would like to carry in 1.0:
- Clean up Boxes, for example, as a public interface we should accept
impl Xxxinstead ofBox<Xxx>. - Refine interfaces so that it is easy to use even without macros
- Maybe completely remove the Protobuf encoding support (as well as protobuf related things?) because Prometheus 2.0 does not support protobuf protocol any more.
- Remove Namespace and Subsystem
- Use failure instead of quick-error.
Nice to have:
- no_std support
Thanks @breeswish. cc @overvenus
Getting fail and prometheus 1.0 out is not explicitly a Q1 goal for me, so others probably need to help, particularly with prometheus, which I sense is more important to us than fail, and with which I am not yet too familiar. I can probably get fail there myself since it has limited scope and is basically ready.
I've added https://github.com/pingcap/rust-prometheus/issues/222 to personally make a pass over the prometheus docs, but beyond that I'm not sure how much more I can do.
Per my comments here I would like to make sure that the APIs for the crate both with and without protobufs has some kind of consistency before 1.0. As that PR stands right now, we will, at least temporarily, end up with quite different APIs based on whether protobufs is on or off.
And @fralalonde on that PR suggests we might even remove protobuf support from the crate completely, presumably moving into its own crate.
cc @fralalonde
Looks like we can release a new 0.x for rust 2018 upgrade because the 1.0 features will not be merged so quickly.
I implemented some ideas listed above in the ng branch, newly written, including:
- Cleaner and simpler API, no macro helpers needed
- Compile-time label length restriction
- No protobuf at all
- No namespaces and subsystems
- Boxes cleaned up
- Rust 2018
However the implementation is far from complete, for example, push and registry is not yet implemented. Still need some time to work for this branch.
I've unassigned myself as I don't see myself personally doing this work.