cadence
An extensible Statsd client for Rust
1.8.0
60M downloads/mo
#1103 most downloaded on crates.io
56quarters/cadence
What this package is like to depend on
Last release 4 months ago
11 Apr 2026
Release timing varies
gaps range from 2 weeks to 1.1 years
Nearly every release is documented
notes for 52 of 52 stable releases
2 versions withdrawn
withdrawn after publishing
11 years old
54 releases · first in 2015
2 releases in the last 12 months
see the full history below
Release timeline
54 releases · Dec 2015 to Apr 2026Releases
latest 54-
1.8.011 Apr 2026Release notes
Open source →- Allow UDP sinks (
UdpMetricSink,BufferedUdpMetricSink) to be configured to periodically re-resolve the hostname of the server that metrics are being sent to. Examples of this can be found in documentation for each sink, theREADME, orexamplesdirectory.
- Allow UDP sinks (
-
1.7.008 Feb 2026Release notes
Open source →- Fix an issue with
BufferedUdpMetricSinkstats not being updated per #227. Thanks to @danielnorberg for this contribution. - Update the minimum supported Rust version to 1.70 (from 1.60) since 1.60 is unreliable in CI.
- Fix an issue with
-
1.6.021 Jun 2025Release notes
Open source →- Fix an issue with
MultiLineWriterwhere buffering could cause metrics to be emitted out of order per #218. Thanks to @dwhjames for this fix. - Add a
replace_writermethod toMultiLineWriterto allow broken writers to be replaced (such as connection oriented writers like TCP streams) per #215. Thanks to @dwhjames for this contribution.
- Fix an issue with
-
1.5.027 Sep 2024Release notes
Open source →- Add support for Datadog Statsd extensions sample rates, container IDs, and explicit timestamps per #211. Thanks to @iksaif for this contribution.
-
1.4.028 Apr 2024Release notes
Open source →- Make the previously internal
MultiLineWriterandSocketStatsstructs available from thecadence::extmodule per #206. These can be useful when creating customMetricSinkimplementations. Thanks to @mlowicki for this contribution.
- Make the previously internal
-
1.3.023 Mar 2024Release notes
Open source →- Add support for using
u64,i32, andu32types as counters per #201. Thanks to @James-Bartman for this contribution. - Add
MetricSink::stats()method to theMetricSinkinterface to allow sinks to expose low-level network telemetry per #203. Thanks to @mlowicki for this contribution. - Add
StatsdClient::flush()method to the client to allow time-sensitive metrics to be flushed sooner than they otherwise might be per #200. Thanks to @James-Bartman for this contribution;
- Add support for using
-
1.2.021 Feb 2024Release notes
Open source →- Add
QueuingMetricSinkBuilderto allow an error handler to be set for the wrappedMetricSinkimplementation per #195. Thanks to @mlowicki for this contribution.
- Add
-
1.1.003 Feb 2024Release notes
Open source →- Update
crossbeam-channeldependency to0.5.11. - Bump minimum supported Rust version to
1.60from1.56. - Add
MetricSink::flush()implementation toQueuingMetricSinkper #191. Thanks to @mlowicki for this contribution.
- Update
-
1.0.002 Dec 2023Release notes
Open source →- Remove deprecated
StatsdClient::from_udp_hostmethod andCompattrait per #181. These methods have been deprecated sincev0.26. See MIGRATION.md for more information.
- Remove deprecated
-
0.29.122 May 2023Release notes
Open source →- Fix a bug where distribution metrics didn't include default tags per #184. Thanks to @danielsig727 for this contribution.
-
0.29.002 Apr 2022Release notes
Open source →- Add support for "default tags" that can be added to a
StatsdClientwhen creating it using the builder per #172. Default tags will be automatically added to all metrics emitted by the client. Thanks to @look for this contribution.
- Add support for "default tags" that can be added to a
-
0.28.029 Jan 2022Release notes
Open source →- Breaking change - Add support for packed values
which allows multiple values to be sent as a single metric for histogram,
distribution, and timer types per #169.
The Cadence client now accepts
Vec<T>for histogram, distribution, and timer methods. Note that this feature is a Datadog extension and so may not be supported by your server. It is supported by versions>=v6.25.0 && <v7.0.0or>=v7.25.0of the Datadog agent. Thanks to @Jason8Ni for this contribution.
- Breaking change - Add support for packed values
which allows multiple values to be sent as a single metric for histogram,
distribution, and timer types per #169.
The Cadence client now accepts
-
0.27.026 Dec 2021Release notes
Open source →- Breaking change -
StatsdClientno longer implements theClonetrait due to now usingBoxinternally instead ofArcper #163. WhereStatsdClientwas.clone()'d previously, it should now be wrapped with anArcto enable it to be cloned. - Minor performance improvement in the way metric tags are formatted per #161.
- Breaking change -
-
0.26.023 Jul 2021Release notes
Open source →- Breaking change - Client traits are now generic across supported types of
values #132. This change
should be source-compatible in most cases for users importing the Cadence
preludemodule. Type-specific deprecated methods have been moved to a newCompattrait to ease this migration. This trait and its implementation will be removed in a future release. See MIGRATION.md for more information. - Add support for
f64values for histogram and distribution metric types per #131. - Minimum supported Rust version for Cadence is now 1.41 per #138.
- Breaking change - Client traits are now generic across supported types of
values #132. This change
should be source-compatible in most cases for users importing the Cadence
-
0.25.021 Mar 2021Release notes
Open source →-
Breaking change - Added support for DataDog distribution metric types per #125 thanks to @duarten.
-
Breaking change - Rewrite
SpyMetricSinkandBufferedSpyMetricSinkintroduced in 0.22.0 to use channels for making written metrics available instead of sharedWriteimplementation wrapped with aMutex. The newly changed sinks now return acrossbeam_channel::Receiver<Vec<u8>>instance from their constructors that callers can use to read any metrics written by the sink. This avoids accidental cases of mutex poisoning which can happen when theMutexis held when an assertion fails as part of a test per #124.Examples of how to use the newly rewritten sinks can be found in:
-
Breaking change - Remove unsafe uses of
static mutused for global state related to macros which caused undefined behavior per #129 thanks to @parasyte. A consequence of this thatcadence_macros::set_global_defaultandcadence_macros::get_global_defaultnow only accept instances ofStatsdClient, not the traitMetricClient.
-
-
0.24.003 Feb 2021Release notes
Open source →cadence-macrosyanked due to causing undefined behavior #129- Split the project into two crates. The
cadencecrate will continue to contain the primary client and API. Thecadence-macroscrate contains convenience macros for removing some boilerplate required to emit metrics per #114. - Fix
MultilineWriter(used by buffered sinks) to honor theWrite::writecontract per #117.
- Split the project into two crates. The
-
0.23.015 Dec 2020 -
0.22.009 Oct 2020Release notes
Open source →- Add new
SpyMetricSinkandBufferedSpyMetricSinkto allow inspecting metrics sent by Cadence as part of integration testing an application per #103.
- Add new
-
0.21.102 Sep 2020 -
0.21.002 Sep 2020Release notes
Open source →- Add a
.flush()method to theMetricSinktrait to allow applications to flush metrics out-of-band per #100.
- Add a
-
0.20.007 Apr 2020Release notes
Open source →- The
QueuingMetricSinkcan now be created with a fixed queue size using the::with_capacity()constructor. This allows users to limit the amount of memory used by sending metrics (in case the wrapped sink can't keep up with the rate of metrics being sent due to to some sort of error). - Updated dependency on
crossbeam_channelto version0.4.0+; - Breaking change - The
Histogrammedtrait now includes methods for sendingDurationobjects, converted to nanoseconds, as histogram values. - Breaking change - The
QueuingMetricSink::panics()method now returns au64, not ausize.
- The
-
0.19.112 Oct 2019 -
0.19.007 Oct 2019Release notes
Open source →- Fix cases where sending large payloads (a single metric larger than a UDP packet while using the buffered UDP sink) caused an extra UDP packet to be sent containing only a newline per #87.
- Add support for emitting metrics over a Unix socket via the new
UnixMetricSinkandBufferedUnixMetricSinkper #86 thanks to Daniel Smith. - Deprecate the
StatsdClient::from_udp_hostconstructor which will be removed in a future release. Users are encouraged to use the::from_sink()and::builder()constructors instead. - All Cadence examples (in the
examplesdirectory) are now available under the CC0 agreement (basically public domain even in countries with no such concept).
-
0.18.001 Aug 2019Release notes
Open source →- Allow empty strings to be use for metric prefixes. Previously, this would
result in metrics with a leading
., now an empty prefix results in just the bare metric key. - Breaking change - Update Cadence to build with Rust 2018 per #82. Note that Cadence should still work fine with Rust 2015 code bases as well as Rust 2018 code bases. This is marked as a breaking change but will likely not require changes for most users. See the Rust edition docs for more information.
- Allow empty strings to be use for metric prefixes. Previously, this would
result in metrics with a leading
-
0.17.130 Mar 2019Release notes
Open source →- Replace internal use of crossbeam
MsQueuewith channels from thecrossbeam_channelcrate per #79. This change improves performance of theQueuingMetricSink, reducing the time taken to submit a metric by about 50%. This is a non-breaking change.
- Replace internal use of crossbeam
-
0.17.030 Mar 2019 withdrawnNothing published for this version
-
0.16.007 Dec 2018Release notes
Open source →- Breaking change - Require that all sinks and error handlers used with
StatsdClientare panic safe, that is, they implementRefUnwindSafeper #77. Note that all sinks included with Cadence are panic safe so this shouldn't be much of a change for many users. See also Rust #54768 for more information about the reasoning for the change.
- Breaking change - Require that all sinks and error handlers used with
-
0.15.119 Jul 2018Release notes
Open source →- Update Cadence crate to forbid any uses of
unsafe {}code. - Minor documentation improvements.
- Update Cadence crate to forbid any uses of
-
0.15.013 Jul 2018Release notes
Open source →- Breaking change - Add support for
Setmetric types. Sets can be used to count the number of unique occurences of an event. Per #62. - Updated dependency on
crossbeamto the latest version (0.3.2).
- Breaking change - Add support for
-
0.14.012 Apr 2018Release notes
Open source →- Breaking change - Rename the
MetricBuilder::send()method toMetricBuilder::try_send()and create a new.send()method that discards successful results and invokes a custom handler for error results. Handlers can be set by using a builder via theStatsdClient::builder()method. Per #65.
- Breaking change - Rename the
-
0.13.214 Mar 2018Release notes
Open source →- Warn when
MetricBuilderinstances aren't used when adding tags to metrics per #63.
- Warn when
-
0.13.107 Feb 2018 -
0.13.007 Feb 2018Release notes
Open source →- Breaking change - Added
_with_tagsmethod variants to all traits for emitting metrics (Counted,Timed,Gauged,Metered,Histogrammed) per #41. These methods will return aMetricBuilderinstance that can be used to add Datadog style tags to metrics. Tags are an extension so they may not be supported by all Statsd servers. - The
Metrictrait (which is used by each type of metric object for returning a&strrepresentation of itself) is now part of the public API.
- Breaking change - Added
-
0.12.230 Nov 2017Release notes
Open source →- Fix off-by-one bug in underlying functionality for
BufferedUdpSinkthat would have caused extra writes to the UDP socket per #59.
- Fix off-by-one bug in underlying functionality for
-
0.12.122 Sep 2017 -
0.12.010 Feb 2017 -
0.11.019 Jan 2017Release notes
Open source →- Breaking change - Remove deprecated
AsyncMetricSinkper #47. Users are encouraged to switch toQueuingMetricSinkinstead.QueuingMetricSinkhas similar performance, emits metrics asynchronously in another thread, and has a more ergonomic signature (not requiring a generic parameter for the wrapped sink). - Breaking change - Remove the generic parameter
Tfrom theStatsdClientper #45. Instead of requiring all users of the client to care about theMetricSinkimplementation, put it behind anArcpointer in the client and remove the typeTfrom the signature. This makes the client easier to use and share between threads. - Remove use of
Arcinside various sinks per #35.
- Breaking change - Remove deprecated
-
0.10.009 Jan 2017Release notes
Open source →- Breaking change - Remove deprecated
ConsoleMetricSinkandLoggingMetricSinkper #46. Users wishing to still use these sinks are encouraged to copy the code into their own projects or use Cadence version 0.9.1 until they migrate away from them. - Deprecate
AsyncMetricSinkper #34. Anyone still usingAsyncMetricSinkis encouraged to switch toQueuingMetricSinkinstead. Performance should be comparable butQueuingMetricSinkcan be shared between threads without requiring a.clone().
- Breaking change - Remove deprecated
-
0.9.101 Jan 2017Release notes
Open source →- Change deprecation version of
LoggingMetricSinkandConsoleMetricSinkto 0.10.0.
- Change deprecation version of
-
0.9.001 Jan 2017 -
0.8.213 Dec 2016 -
0.8.111 Oct 2016 -
0.8.028 Aug 2016Release notes
Open source →- Add new
BufferedUdpMetricSinkimplementation of aMetricSinkthat buffers multiple metrics before sending then in a single network operation per #18. - Add new
AsyncMetricSinkimplementation of aMetricSinkthat wraps another sink and sends metrics asynchronously using a thread pool per #23. - Implement
Clonetrait for all builtin sinks for easier use with multiple threads, specifically theAsyncMetricSinkper #24.
- Add new
-
0.7.027 Jul 2016Release notes
Open source →- Add new
MetricClienttrait implemented byStatsdClientthat encompasses all of the other traits for emitting metrics (Counted,Timed,Gauged, andMetered) so that users can refer to a single type when used with generics or behind a pointer per #20.
- Add new
-
0.6.021 Jul 2016Release notes
Open source →- Change Cadence to be dual licensed under Apache and MIT licenses per #12.
- Improve documentation around
MetricSinktrait per #13. - Behavior change - Change UDP sockets created by
StatsdClient::from_udp_hostto be created in non-blocking mode by default per #14. While this does change previous behavior, users of the library shouldn't notice much of a change. In instances where the caller would have blocked before, they will get aMetricErrorwrapping anio::Error(with anErrorKindofWouldBlock). Users wishing to restore the old behavior can do so by creating a custom instance ofUdpMetricSink. Thanks to the Tikv team for the inspiration.
-
0.5.202 Jul 2016 -
0.5.107 Jun 2016Release notes
Open source →- Remove
debug!call in internal StatsdClient call to cut down on log noise per #7.
- Remove
-
0.5.010 Mar 2016Release notes
Open source →- Breaking change - Rename the constructor of
UdpMetricSinkfromnewtofromto better match Rust naming conventions for conversion constructors.
- Breaking change - Rename the constructor of
-
0.4.019 Feb 2016Release notes
Open source →- Change name of method for getting metric
&strrepresentation. The old name implied that the instance was consumed which it was not. - Create
cadence::preludemodule for easy import ofCounted,Timed,Gauged, andMeteredtraits via a glob import. Fixes #4.
- Change name of method for getting metric
-
0.3.007 Feb 2016 -
0.2.207 Feb 2016 withdrawnNothing published for this version
-
0.2.127 Dec 2015Release notes
Open source →- Change Cadence from MIT license to Apache-2.0 for better compatibility with BSD and GPLv3 licensed code.
-
0.2.027 Dec 2015Release notes
Open source →- Remove unused development dependency.
- Add
Hashtrait to assorted metric types (Counter,Timer,Gauge,Meter). - Documentation improvements.
-
0.1.023 Dec 2015