PackageTrack
Sign in Get early access

metrics-exporter-prometheus

A metrics-compatible exporter for sending metrics to Prometheus.

0.18.3 43M downloads/mo #1367 most downloaded on crates.io metrics-rs/metrics

What this package is like to depend on

Last release 3 months ago

30 Apr 2026

Ships fairly regularly

a new release about every 2 months

Nearly every release is documented

notes for 29 of 29 stable releases

3 versions withdrawn

withdrawn after publishing

6 years old

42 releases · first in 2020

4 releases in the last 12 months

see the full history below

Release timeline

42 releases · Jun 2020 to Apr 2026
2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 42
  1. 0.18.3 30 Apr 2026
    Release notes

    chore: Release metrics-exporter-prometheus version 0.18.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 →
  2. 0.18.2 28 Apr 2026 withdrawn
    Release notes

    Added

    • New PrometheusHandle::render_protobuf_to_write method to render the Protocol Buffers payload directly into a Write implementation. (#661)

    Changed

    • Descriptions are now stored in a lock-free evmap, eliminating writer contention with the rendering hot path. (#672)
    • PrometheusRecorder uses Key::to_retained() for more efficient long-lived key storage. (#688)
    • License updated to reflect the bundled Prometheus protobuf schema. (#683)
    • Use write! in write_metric_line for a small rendering perf improvement. (#658)
    Open source →
  3. 0.18.1 07 Dec 2025
    Release notes

    Fixed

    • Fixed a bug where native histograms were incorrectly skipped when serialized the Protocol Buffers payload. (#649)
    Open source →
  4. 0.18.0 28 Nov 2025
    Release notes

    Added

    • Added with_recommended_naming to PrometheusBuilder, which when set to true will use the recommended naming convention for Prometheus metrics: suffixing counters with _total and ensuring unit suffixes are present. Users should prefer this going forward, and set_enable_unit_suffix is deprecated and will be removed in a future release in favor of with_recommended_naming. (#596)
    • Added support for emitting metrics in the Protocol Buffers-based scrape format. The exporter automatically detects which format to render responses in based on the presence/value of the Accept header in requests. Additionally, a new method, PrometheusHandle::render_protobuf, has been added to render metrics in this format, similar to PrometheusHandle::render. (#602)
    • Added LabelSet, which provides a wrapper around label key/value pairs to ensure consistent sanitization. (#605)
    • Added anew feature flag, push-gateway-no-tls-provider, to allow enabling push gateway support without including a default TLS provider via rustls. Users enabling this flag must install a default TLS provider for rustls via rustls::crypto::CryptoProvider::install_default. (#607)
    • Added experimental support for native histograms. Users can enable native histograms using the existing matcher approach by calling PrometheusBuilder::set_native_histogram_for_metric. Native histograms are only rendered when the Protocol Buffers-based scrape format is in use. (#610)
    • Added a new method (render_to_write) to PrometheusHandle that allows writing directly to a Write implementation. (#641)

    Changed

    • Slightly updated the logic for rendering Prometheus outputs to be more incremental where possible to allow render_to_write to be roughly constant memory usage regardless of the overall number of metrics being rendered. (#641)

    Fixed

    • Fixed a bug where the _total suffix for counters was not being appended to the HELP or TYPE lines for counters. (#597)
    Open source →
  5. 0.17.2 20 Jun 2025
    Release notes

    Changed

    • Update metrics-util to 0.20.
    Open source →
  6. 0.17.1 18 Jun 2025
    Release notes

    Fixed

    • Apply unit suffixes in the correct portion of metric names when unit suffixing is enabled. (#582)
    Open source →
  7. 0.17.0 20 Apr 2025
    Release notes

    Changed

    • Updated rand to 0.9. (#556)
    • Bumped thiserror to 2.0. (#572)
    • Added new flag, use_http_post_method, to PrometheusBuilder::with_push_gateway, to allow changing the HTTP method used for pushing from PUT to POST. This enables usage with systems like Vector which don't natively support PUT. (#574)
    • Render scrape endpoint/push gateway payloads in a blocking thread to avoid blocking regular Tokio executor threads. (#576)
    Open source →
  8. 0.16.2 31 Jan 2025
    Release notes

    Fixed

    • Fixed a bug where the configurable unit suffix was not properly applied to the "sum" and "count" lines for histograms. The prior release will be yanked as this represented a backwards-incompatible change.
    Open source →
  9. 0.16.1 06 Jan 2025 withdrawn
    Release notes

    Changed

    • Updated the crate-level documentation, and the documentation for PrometheusBuilder::build_recorder and PrometheusBuilder::install_recorder, to call out the requirements around running upkeep periodically. (#537)
    • Updated to new version of metrics-util.

    Added

    • Added support for suffixing metric names based on their configured units. (#535)
    Open source →
  10. 0.16.0 12 Oct 2024
    Release notes

    Added

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

    Changed

    • Fixed a number of Clippy lints. (#510)
    • Bump MSRV to 1.71.1. (#530)
    Open source →
  11. 0.15.3 13 Jul 2024
    Release notes

    Republishing 0.15.2 as 0.15.3 to fix an incorrect publish.

    Open source →
  12. 0.15.2 13 Jul 2024 withdrawn
    Release notes

    Added

    • Added support to use a UDS listener for the HTTP gateway mode. (#498)

    Changed

    • Update the Content-Type response header to text/plain, matching the Exposition format specification. (#496)
    Open source →
  13. 0.15.1 24 Jun 2024
    Release notes

    Changed

    • Switch to rustls. (#489)
    Open source →
  14. 0.15.0 27 May 2024
    Release notes

    Changed

    • Bump MSRV to 1.70.0.
    Open source →
  15. 0.14.0 16 Mar 2024
    Release notes

    Added

    • Users can now configure the number of buckets, and bucket widths, for rolling summaries. (#444)
    • Added support to run exporter "upkeep" in the background to periodically drain histograms and help avoid unbounded memory growth over time. (#460)

    Changed

    • Upgrade to hyper 1.x. (#450)
    • Enabled upkeep by default, with a five second interval. (#460)
    Open source →
  16. 0.13.1 11 Feb 2024
    Release notes

    Added

    • A new scrape endpoint path, /health, which returns a a basic response to indicate endpoint health. (#435)

    Changed

    • Bumped the indexmap dependency to the latest version. (#439)
    Open source →
  17. 0.13.0 24 Dec 2023
    Release notes

    Added

    • Support for using HTTPS in Push Gateway mode. (#392)

    Changed

    • Bump MSRV to 1.65.0.
    Open source →
  18. 0.12.2 13 Dec 2023
    Release notes

    Fixed

    • Fixed overflow/underflow panic with time moving backwards (#423)
    Open source →
  19. 0.12.1 09 May 2023
    Release notes

    Added

    • Support for specifying a username/password for HTTP Basic Authentication when pushing to a Push Gateway. (#366)
    Open source →
  20. 0.12.0 16 Apr 2023
    Release notes

    Changed

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

    Changed

    • Aggregated summaries are now rolling, allowing oldering data points to expire and quantile values to reflect the recent past rather than the lifetime of a histogram. (#306)

      They have a default width of three buckets, with each bucket being 20 seconds wide. This means only the last 60 seconds of a histogram -- in 20 second granularity -- will contribute to the quantiles emitted.

      We'll expose the ability to tune these values in the future.

    • Switched to using portable_atomic for 64-bit atomics on more architectures. (#313)

    Open source →
  22. 0.10.0 30 May 2022
    Release notes

    Fixed

    • In some cases, metric names were being "sanitized" when they were already valid. (#290, #296)
    Open source →
  23. 0.9.0 11 Mar 2022
    Release notes

    Added

    • New top-level module, formatting, which exposes many of the helper methods used to sanitize and render the actual Prometheus exposition format. (#285)
    Open source →
  24. 0.8.0 15 Jan 2022
    Release notes

    Added

    • New builder method, PrometheusBuilder::install_recorder, which builds and installs the recorder and returns a PrometheusHandle that can be used to interact with the recorder.

    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.
    • Updated to the new handle-based design of metrics.
    • Renamed tokio-exporter feature flag to http-listener.
    • Renamed PrometheusBuilder::build to build_recorder.
    • Renamed PrometheusBuilder::build_with_exporter to build.
    • InstallError is now BuildError, and contains many more variants with hopefully) better error messages for understanding when something went wrong.
    • Most builder methods are now fallible to help avoid runtime panics for invalid data given when building, and to better surface this upfront to users.
    • Rendered output for histograms is now stable, based on the order in which a given key (name/labels) was recorded.

    Fixed

    • Label keys and values, as well as metric descriptions, are now correctly sanitized according to the Prometheus data model and exposition format. (#248)
    • Metric descriptions are correctly mapped to metrics whose names have been modified during sanitization.
    • Histograms are now correctly removed when they exceed the idle timeout.
    Open source →
  25. 0.7.0 16 Dec 2021
    Release notes

    Changed

    • Calling PrometheusBuilder::install inside a Tokio runtime will spawn the exporter on that runtime rather than spawning a new runtime. (#251)
    Open source →
  26. 0.6.1 16 Sep 2021
    Release notes

    Changed

    • Simple release to bump dependencies.
    Open source →
  27. 0.6.0 15 Jul 2021
    Release notes

    Added

    • Support for pushing to a Push Gateway. (#217)
    Open source →
  28. 0.5.0 18 May 2021
    Release notes

    Added

    • PrometheusBuilder::add_allowed, which enables the exporter to be configured with a list of IP addresses or subnets that are allowed to connect. By default, no restrictions are enforced.
    Open source →
  29. 0.4.0 03 May 2021
    Release notes

    Changed

    • Bumped metrics dependency to 0.15 and updated the necessary APIs.
    Open source →
  30. 0.3.0 03 Feb 2021
    Release notes

    Changed

    • Bumped metrics dependency to 0.14.
    Open source →
  31. 0.2.0 24 Jan 2021
    Release notes

    Changed

    • Switched from MetricKind for MetricKindMask for PrometheusBuilder::idle_timeout.
    Open source →
  32. 0.1.0 22 Jan 2021
    Release notes

    Added

    • Genesis of the crate.
    Open source →
  33. 0.1.0-alpha.13 12 Jan 2021 pre-release

    Nothing published for this version

  34. 0.1.0-alpha.12 18 Dec 2020 pre-release

    Nothing published for this version

  35. 0.1.0-alpha.10 25 Nov 2020 pre-release

    Nothing published for this version

  36. 0.1.0-alpha.9 25 Nov 2020 pre-release

    Nothing published for this version

  37. 0.1.0-alpha.7 03 Nov 2020 pre-release

    Nothing published for this version

  38. 0.1.0-alpha.6 24 Oct 2020 pre-release

    Nothing published for this version

  39. 0.1.0-alpha.4 16 Sep 2020 pre-release

    Nothing published for this version

  40. 0.1.0-alpha.3 22 Jul 2020 pre-release

    Nothing published for this version

  41. 0.1.0-alpha.2 17 Jun 2020 pre-release

    Nothing published for this version

  42. 0.1.0-alpha.1 17 Jun 2020 pre-release

    Nothing published for this version

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