cadence-macros
Macros for Cadence, an extensible Statsd client for Rust
1.8.0
11M downloads/mo
#2937 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 15 of 15 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
16 releases · first in 2021
2 releases in the last 12 months
see the full history below
Release timeline
16 releases · Feb 2021 to Apr 2026Releases
latest 16-
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 2021 withdrawnRelease 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