metrics-macros
Macros for the metrics crate.
0.7.1
35M downloads/mo
#1550 most downloaded on crates.io
metrics-rs/metrics
What this package is like to depend on
Last release 3 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 9 months
Nearly every release is documented
notes for 9 of 10 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
19 releases · first in 2020
0 releases in the last 12 months
see the full history below
Release timeline
19 releases · Jun 2020 to Dec 2023Releases
latest 19-
0.7.123 Dec 2023Nothing published for this version
-
0.7.016 Apr 2023Release notes
Open source →Changed
- Bump MSRV to 1.61.0.
Fixed
- Type paths are now fully qualified in all macros to avoid issues with local import scopes having a
pre-existing
metricsmodule.
-
0.6.022 Jul 2022Release notes
Open source →Changed
- Updated the describe macros to support the recent change to taking
metrics::SharedStringinstead of&'static strfor description strings.
- Updated the describe macros to support the recent change to taking
-
0.5.106 Feb 2022 -
0.5.015 Jan 2022Release notes
Open source →Added
- When describing a metric, a constant can now be used for the description itself.
- Label keys can now be general expressions i.e. constants or variables. Due to limitations in
how procedural macros work, and the facilities available in stable Rust for const traits, even
&'static strconstants will cause allocations when used for emitting a metric.
Changed
- Correctly scoped the required features of various dependencies to reduce build times/transitive dependencies.
- Updated macros to coincide with the update to
metricsfor metric handles. This includes renamingregister_*macros todescribe_*, which are purely for providing data that describes a metric but does not initialize it in any way, and providing newregister_*macros which do initialize a metric. - Updated the
describe_*macros -- néeregister_*-- to require a description, and an optional unit. As describing a metric does not register it in the sense of ensuring that it is present on the output of an exporter, having the description be optional no longer makes sense. - Additionally, the describe macros no longer take labels. In practice, varying the description of a specific metric based on label values would be counter-intuitive, and to support this corner case requires adds significant complexity to the macro parsing logic.
Removed
- Two unecessary dependencies,
lazy_staticandregex.
-
0.4.116 Dec 2021 -
0.4.018 May 2021Release notes
Open source →Changed
- Updates to macros to support the removal of
NamePartsand related machinery.
- Updates to macros to support the removal of
-
0.3.003 May 2021Release notes
Open source →Changed
- Updates to macros to support changes in
Recorderaround how keys are taken.
- Updates to macros to support changes in
-
0.2.003 Feb 2021 -
0.1.022 Jan 2021 -
0.1.0-alpha.918 Dec 2020 pre-releaseNothing published for this version
-
0.1.0-alpha.818 Dec 2020 pre-releaseNothing published for this version
-
0.1.0-alpha.725 Nov 2020 pre-releaseNothing published for this version
-
0.1.0-alpha.625 Nov 2020 pre-releaseNothing published for this version
-
0.1.0-alpha.524 Oct 2020 pre-releaseNothing published for this version
-
0.1.0-alpha.424 Oct 2020 pre-releaseNothing published for this version
-
0.1.0-alpha.316 Sep 2020 pre-releaseNothing published for this version
-
0.1.0-alpha.222 Jul 2020 pre-releaseNothing published for this version
-
0.1.0-alpha.117 Jun 2020 pre-releaseNothing published for this version