56quarters / cadence

An extensible Statsd client for Rust
https://docs.rs/cadence/
Apache License 2.0
84 stars 27 forks source link

Support all Datadog statsd extensions #211

Closed iksaif closed 3 weeks ago

iksaif commented 3 weeks ago

See https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=metrics for details

56quarters commented 3 weeks ago
  • @<SAMPLE_RATE> A float between 0 and 1, inclusive. Mostly important for distributions in order to get a correct count in the backend.

Looking at a previous PR to add sampling support (#182), I notice that we're adding support for sampling here in the metric that is sent to the backend but we aren't actually selectively sending them. Can you make a note in the documentation for adding sample rate that the caller of the Cadence method is expected to make a sampling decision outside of Cadence?

56quarters commented 3 weeks ago

Clippy failure looks unrelated to your changes. I've fixed the issue in master if you could rebase :pray:

iksaif commented 3 weeks ago
  • @<SAMPLE_RATE> A float between 0 and 1, inclusive. Mostly important for distributions in order to get a correct count in the backend.

Looking at a previous PR to add sampling support (#182), I notice that we're adding support for sampling here in the metric that is sent to the backend but we aren't actually selectively sending them. Can you make a note in the documentation for adding sample rate that the caller of the Cadence method is expected to make a sampling decision outside of Cadence?

Yes I added some doc about this. We might one day implement sampling in cadence, but at least this allows the caller to do it today.

56quarters commented 3 weeks ago

Version 1.5 has been released which contains these changes.