PackageTrack
Sign in Get early access

metrics-util

Helper types/functions used by the metrics ecosystem.

0.20.4 86M downloads/mo #890 most downloaded on crates.io metrics-rs/metrics

What this package is like to depend on

Last release 3 months ago

13 May 2026

Ships fairly regularly

a new release about every 3 months

Nearly every release is documented

notes for 37 of 38 stable releases

2 versions withdrawn

withdrawn after publishing

7 years old

50 releases · first in 2019

4 releases in the last 12 months

see the full history below

Release timeline

50 releases · Apr 2019 to May 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 50
  1. 0.20.4 13 May 2026
    Release notes

    chore: Release metrics-util version 0.20.4

    Open source →
    Release notes

    Fixed

    • Tightened the metrics dependency constraint to ^0.24.6 so that consumers of metrics-util resolve a fixed metrics. The metrics 0.24.6 release fixes a duplicate-entry regression in metrics::KeyHasher that affected metrics_util::registry::Registry in versions 0.19.0 through 0.20.1. metrics-util 0.20.2+ carries its own no-op KeyHasher and is unaffected by metrics::KeyHasher's behavior, but the dep bump documents the intended pairing. (#694)
    Open source →
  2. 0.20.3 30 Apr 2026
    Release notes

    chore: Release metrics-util version 0.20.3

    Open source →
    Release notes

    Fixed

    • Tightened the metrics dependency constraint to ^0.24.5 to avoid build failures when an older metrics 0.24.x is locked. (#692)
    Open source →
  3. 0.20.2 28 Apr 2026 withdrawn
    Release notes

    chore: Release metrics-util version 0.20.2

    Open source →
    Release notes

    Added

    • New metrics_util::common::KeyHasher, replacing the now-deprecated metrics::KeyHasher. (#669)
    • Drain::count() and Drain::sum() methods to expose true-value counts/sums on reservoir-sampled storage. (#681)
    • Blanket Storage<K> implementation for Arc<T> where T: Storage<K>. (#657)
    • Summary::sum() method to retrieve the running sum of recorded values. (#650)

    Changed

    • DebuggingRecorder uses Key::to_retained() for more efficient long-lived key storage. (#688)
    Open source →
  4. 0.20.1 28 Nov 2025
    Release notes

    Fixed

    • Fixed an atomicity violation in AtomicSamplingReservoir::consume. (#606)
    Open source →
  5. 0.20.0 20 Jun 2025
    Release notes

    Changed

    • No changes. This release replaces 0.19.2, as #588 introduced a breaking change that should not have been released as a patch version.
    Open source →
  6. 0.19.2 18 Jun 2025 withdrawn
    Release notes

    Changed

    • Taking a snapshot from DebuggingRecorder now has "consume" semantics for counters and gauges, matching the behavior observed for histograms. (#588)

    Fixed

    • Use the AtomicU64 type exposed from metrics::atomics in AtomicSamplingReservoir to allow building on 32-bit platforms. (#585)
    Open source →
  7. 0.19.1 20 Apr 2025
    Release notes

    Changed

    • Updated rand to 0.9. (#556)
    Open source →
  8. 0.19.0 06 Jan 2025
    Release notes

    Added

    • Added new module storage -- behind a feature flag of the same name -- which contains all storage implementations such as Summary, Histogram, AtomicBucket, etc.
    • Added new histogram storage type, AtomicSamplingReservoir, which provides a memory-bounded histogram storage container utilizing reservoir sampling for statistically accurate sampling.

    Changed

    • FanoutBuilder and RouterBuilder now both require recorders to be Sync to facilitate usage with being installed as the global recorder.
    • Moved AtomicBucket, Histogram, and Summary to new storage module.

    Removed

    • Removed handles feature which has been subsumed by the new storage feature flag.
    Open source →
  9. 0.18.0 12 Oct 2024
    Release notes

    Added

    • Added Debug derive to numerous types. (#504)

    Changed

    • Replaced num_cpus::get with std::thread::available_parallelism. (#500)
    • Fixed a number of Clippy lints. (#510)
    • Added Sync constraint to generic parameter in RecoverableRecorder and Stack. (#511)
    • Bump MSRV to 1.71.1. (#530)
    Open source →
  10. 0.17.0 27 May 2024
    Release notes

    Changed

    • Bump MSRV to 1.70.0.
    • Snapshotter now implements Clone. (#472)
    • Relaxed some bounds for different categories of methods on Registry<K, S>. (#484)
    Open source →
  11. 0.16.3 16 Mar 2024
    Release notes

    Added

    • New set of methods on Registry for getting a metric handle if it exists. (#457)
    • New set of methods on Registry for retaining metric handles that match a given predicate. (#461)

    Fixed

    • Bump ahash back to 0.8.8 to remove range constraint after an upstream fix was provided to remove the unnecessary MSRV bump.
    Open source →
  12. 0.16.2 11 Feb 2024
    Release notes

    Fixed

    • Lock down the version of ahash to avoid unnecessary MSRV bumping.
    Open source →
  13. 0.16.0 24 Dec 2023
    Release notes

    Fixed

    • Fixed the Debug implementation for bucket::Block<T> which represented both an unsafe and logically incorrect usage of crossbeam-epoch.

    Changed

    • Bump MSRV to 1.65.0.
    • RecoverableRecorder no longer functions as a drop guard itself, and instead returns a new type, RecoveryHandle<R>, which provides that functionality. (#414)

    Removed

    • Support for per-thread mode in DebuggingRecorder. Users should now use metrics::with_local_recorder instead, which is inherently per-thread.
    Open source →
  14. 0.15.1 02 Jul 2023
    Release notes

    Added

    • Added a new helper type, RecoverableRecorder, that allows installing a recorder and then recovering it later.

    Changed

    • Update aho-corasick to 1.0.
    • Pinned hashbrown to 0.13.1 to avoid MSRV bump.
    Open source →
  15. 0.15.0 16 Apr 2023
    Release notes

    Changed

    • Bump MSRV to 1.61.0.
    • Switch to metrics-exposed version of AtomicU64.
    Open source →
  16. 0.14.0 21 Jul 2022
    Release notes

    Changed

    • Updated sketches-ddsketch to 0.2.0.
    • Switched to using portable_atomic for 64-bit atomics on more architectures. (#313)
    Open source →
  17. 0.13.0 30 May 2022
    Release notes

    Fixed

    • In Summary, some quantiles were previously mapped to an incorrect rank at low sample counts, leading to large swings in estimated values. (#304)

    Changed

    • Bumped the dependency on metrics to deal with a public API change.
    Open source →
  18. 0.12.1 02 May 2022
    Release notes

    Added

    • A new per-thread mode for DebuggingRecorder that allows recording metrics on a per-thread basis to better supporting the testing of metrics in user applications where many tests are concurrently emitting metrics.
    Open source →
  19. 0.12.0 11 Mar 2022
    Release notes

    Added

    • New storage type, GenerationalStorage, that provides the generational behavior of GenerationalAtomicStorage, nee GenerationalPrimitives, without being inherently coupled to using atomic storage.

    Changed

    • Renamed Primitives to Storage, and publicly exposed it so that users can implement their own storage strategies.
    • Renamed StandardPrimitives and GenerationalPrimitives to AtomicStorage and GenerationalAtomicStorage, respectively.
    • Created a new top-level module, registry, that encompasses Registry and all Registry-related and dependent types.
    • Exposed DefaultHashable publicly.
    • Debugging utilities have been moved to a new debugging module, and Snapshot is now public.
    Open source →
  20. 0.11.1 20 Feb 2022
    Release notes

    Fixed

    • Recency incorrectly failed to keep track of the latest generation when a previously-observed metric had changed generations since the first time it was observed.
    Open source →
  21. 0.11.0 15 Jan 2022
    Release notes

    Changed

    • Updated various dependencies in order to properly scope dependencies to only the necessary feature flags, and thus optimize build times and reduce transitive dependencies.
    • Many types are now behind their own feature flags to allow for optimizing build times and dependency tree.
    • Updated to the new handle-based design of metrics.
    • Updated AtomicBucket to use MaybeUninit and better documented the safety invariants in the various areas that use unsafe.
    • AtomicBucket now correctly drops only initialized slots in a Block.
    Open source →
  22. 0.10.2 12 Dec 2021
    Release notes

    Changed

    • Bump atomic-shim from 0.1 to 0.2.
    Open source →
  23. 0.10.1 16 Sep 2021
    Release notes

    Changed

    • Simple release to bump dependencies.
    Open source →
  24. 0.10.0 13 Jul 2021
    Release notes

    Changed

    • Bumped metrics dependency to correspond to the change in key hasher.
    Open source →
  25. 0.9.1 24 May 2021
    Release notes

    Changed

    • Pin crossbeam-epoch to the correct version where Atomic::compare_exchange support was added.
    Open source →
  26. 0.9.0 19 May 2021
    Release notes

    Changed

    • Reworked Registry to make generation tracking a configurable property at the type level.
    Open source →
  27. 0.8.0 18 May 2021
    Release notes

    Added

    • New layer -- Router -- for routing specific metrics to target downstream recorders.
    • Registry::clear allows clearing all metrics from the registry.

    Changed

    • Updated all deprecated usages of crossbeam_epoch::Atomic<T>::compare_and_set to compare_exchange.
    Open source →
  28. 0.7.0 03 May 2021
    Release notes

    Changed

    • Switched Registry over to supporting &Key.
    • Switched from dashmap to hashbrown/parking_lot for Registry.
    • Updated all layers to support the change from Key to &Key in metrics::Recorder.`

    Added

    • Support for using the pre-hashed value of Key to speed up Registry operations.
    Open source →
  29. 0.6.2 08 Mar 2021
    Release notes

    Changed

    • Fixed issue with ordering on CompositeKey. (#182)
    Open source →
  30. 0.6.1 07 Feb 2021
    Release notes

    Added

    • Added AbsoluteLayer for supporting counters reported via absolute value.
    Open source →
  31. 0.6.0 03 Feb 2021
    Release notes

    Changed

    • Bumped metrics dependency to 0.14.
    Open source →
  32. 0.5.0 24 Jan 2021
    Release notes

    Changed

    • MetricKind is now MetricKindMask, and MetricKind is used to define the source side i.e. MetricKindMask is used to match against MetricKind.
    Open source →
  33. 0.4.1 22 Jan 2021
    Release notes
    • No changes.
    Open source →
  34. 0.4.0 22 Jan 2021
    Release notes

    Added

    • Added multiple utility layers: prefix, filter, and fanout.
    • Added CompositeKey for defining a metric kind/key combination.
    • Added Histogram for defining a bucket-based histogram.
    • Added Registry for storing metric handles mapped to a given key.
    • Added Summary, based on DDSketch, as a more lightweight alternative to hdrhistogram.
    • Added DebuggingRecorder to help tet various types that depend on a Recorder.
    • Added Recency for tracking idle metrics.

    Removed

    • Removed StreamingIntegers as we no longer use it, and compressed_vec is a better option.
    • Removed MetricsTree as we no longer use it.

    Changed

    • AtomicBucket now exposes clear and clear_with for both emptying the bucket and reading the values that were cleared, allowing behavior similiar to atomically swapping a fresh data structure in for another.
    Open source →
  35. 0.4.0-alpha.11 22 Jan 2021 pre-release

    Nothing published for this version

  36. 0.4.0-alpha.10 18 Dec 2020 pre-release

    Nothing published for this version

  37. 0.4.0-alpha.8 25 Nov 2020 pre-release

    Nothing published for this version

  38. 0.4.0-alpha.7 25 Nov 2020 pre-release

    Nothing published for this version

  39. 0.4.0-alpha.6 24 Oct 2020 pre-release

    Nothing published for this version

  40. 0.4.0-alpha.5 24 Oct 2020 pre-release

    Nothing published for this version

  41. 0.4.0-alpha.4 08 Oct 2020 pre-release

    Nothing published for this version

  42. 0.4.0-alpha.3 16 Sep 2020 pre-release

    Nothing published for this version

  43. 0.4.0-alpha.2 27 Jul 2020 pre-release

    Nothing published for this version

  44. 0.4.0-alpha.1 17 Jun 2020 pre-release

    Nothing published for this version

  45. 0.3.2 17 Nov 2020

    Nothing published for this version

  46. 0.3.1 21 Nov 2019
    Release notes

    Changed

    • Updated to crossbeam-epoch 0.8 and switched directly to crossbeam-utils for tests.
    Open source →
  47. 0.3.0 30 Jul 2019
    Release notes

    Added

    • MetricTree allows storing hierarchical metric values while being serializable by serde. (#38)
    Open source →
  48. 0.2.1 13 Jun 2019
    Release notes

    Erroneously bumped/published. No changes.

    Open source →
  49. 0.2.0 11 Jun 2019
    Release notes

    Added

    • StreamingIntegers allows holding a set of integers in a compressed format in-memory. (#13)
    • AtomicBucket provides an append-only list of items that can be snapshot without stopping writes. (#13)
    Open source →
  50. 0.1.0 23 Apr 2019
    Release notes

    Added

    • Effective birth of the crate.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive