rust-prometheus icon indicating copy to clipboard operation
rust-prometheus copied to clipboard

Release version 1.0

Open brson opened this issue 6 years ago • 14 comments
trafficstars

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.

brson avatar Jan 03 '19 22:01 brson

I would like to carry the following new features:

  • type-safe labels (in length)
  • optional protobuf dependency

breezewish avatar Jan 04 '19 03:01 breezewish

Thanks for the feedback @breeswish! I'll ask more about them when I start this work.

brson avatar Jan 04 '19 18:01 brson

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! :)

fmckeogh avatar Jan 14 '19 14:01 fmckeogh

@breeswish

Please release it.

siddontang avatar Jan 14 '19 14:01 siddontang

Looks like we have already assigned version 0.5 because of some existing breaking change. I'm going to just release 0.5!

breezewish avatar Jan 14 '19 16:01 breezewish

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

breezewish avatar Jan 14 '19 16:01 breezewish

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.

brson avatar Jan 23 '19 09:01 brson

@breeswish can you say more about "type-safe labels (in length)" or link to an issue explaining it?

brson avatar Jan 23 '19 09:01 brson

@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).

breezewish avatar Jan 30 '19 09:01 breezewish

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 Xxx instead of Box<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

breezewish avatar Jan 30 '19 09:01 breezewish

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.

brson avatar Jan 30 '19 19:01 brson

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

brson avatar Jan 30 '19 20:01 brson

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.

breezewish avatar Jan 31 '19 10:01 breezewish

I've unassigned myself as I don't see myself personally doing this work.

brson avatar Mar 14 '19 23:03 brson