Skip to content

Commit

Permalink
update changelogs, make ignored test work, fix docs.rs cfg flag rende…
Browse files Browse the repository at this point in the history
…ring
  • Loading branch information
tobz committed Mar 16, 2024
1 parent 5603f6d commit 3e886cf
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
7 changes: 7 additions & 0 deletions metrics-exporter-prometheus/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Users can now configure the number of buckets, and bucket widths, for rolling summaries. ([#444](https://github.com/metrics-rs/metrics/pull/444))
- Added support to run exporter "upkeep" in the background to periodically drain histograms and help
avoid unbounded memory growth over time. ([#460](https://github.com/metrics-rs/metrics/pull/460))

### Changed

- Upgrade to `hyper` 1.x. ([#450](https://github.com/metrics-rs/metrics/pull/450))
- Enabled upkeep by default, with a five second interval. ([#460](https://github.com/metrics-rs/metrics/pull/460))

## [0.13.1] - 2024-02-11

Expand Down
9 changes: 7 additions & 2 deletions metrics-exporter-prometheus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
//!
//! Using the exporter is straightforward:
//!
//! ```ignore
//! ```no_run
//! # use metrics_exporter_prometheus::PrometheusBuilder;
//! // First, create a builder.
//! //
//! // The builder can configure many aspects of the exporter, such as changing the
Expand All @@ -66,6 +67,7 @@
//! // endpoint on.. no problem! You can build the recorder and install it, and get
//! // back a handle that can be used to generate the Prometheus scrape output on
//! // demand:
//! # let builder = PrometheusBuilder::new();
//! let handle = builder.install_recorder().expect("failed to install recorder");
//!
//! // Maybe you have a more complicated setup and want to be handed back the recorder
Expand All @@ -74,11 +76,13 @@
//! //
//! // As this is a more advanced method, it _must_ be called from within an existing
//! // Tokio runtime when the exporter is running in HTTP listener/scrape endpoint mode.
//! # let builder = PrometheusBuilder::new();
//! let (recorder, exporter) = builder.build().expect("failed to build recorder/exporter");
//!
//! // Finally, maybe you literally only want to build the recorder and nothing else,
//! // and we've got you covered there, too:
//! let recorder = builder.build_recorder().expect("failed to build recorder");
//! # let builder = PrometheusBuilder::new();
//! let recorder = builder.build_recorder();
//! ```
//!
//! ## Features
Expand Down Expand Up @@ -109,6 +113,7 @@ pub use distribution::{Distribution, DistributionBuilder};
mod exporter;
pub use self::exporter::builder::PrometheusBuilder;
#[cfg(any(feature = "http-listener", feature = "push-gateway"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "http-listener", feature = "push-gateway"))))]
pub use self::exporter::ExporterFuture;

pub mod formatting;
Expand Down
5 changes: 5 additions & 0 deletions metrics-util/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased] - ReleaseDate

### Added

- New set of methods on `Registry` for getting a metric handle if it exists. ([#457](https://github.com/metrics-rs/metrics/pull/457))
- New set of methods on `Registry` for retaining metric handles that match a given predicate. ([#461](https://github.com/metrics-rs/metrics/pull/461))

### Fixed

- Bump `ahash` back to `0.8.8` to remove range constraint after an upstream fix was provided to
Expand Down
4 changes: 4 additions & 0 deletions metrics-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
#[cfg(feature = "handles")]
mod bucket;
#[cfg(feature = "handles")]
#[cfg_attr(docsrs, doc(cfg(feature = "handles")))]
pub use bucket::AtomicBucket;

#[cfg(feature = "debugging")]
#[cfg_attr(docsrs, doc(cfg(feature = "debugging")))]
pub mod debugging;

#[cfg(feature = "handles")]
Expand All @@ -17,6 +19,7 @@ mod quantile;
pub use quantile::{parse_quantiles, Quantile};

#[cfg(feature = "registry")]
#[cfg_attr(docsrs, doc(cfg(feature = "registry")))]
pub mod registry;

mod common;
Expand All @@ -37,6 +40,7 @@ pub use recoverable::RecoverableRecorder;
#[cfg(feature = "summary")]
mod summary;
#[cfg(feature = "summary")]
#[cfg_attr(docsrs, doc(cfg(feature = "summary")))]
pub use summary::Summary;

pub mod layers;
Expand Down
1 change: 1 addition & 0 deletions metrics-util/src/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub use storage::{AtomicStorage, Storage};
mod recency;

#[cfg(feature = "recency")]
#[cfg_attr(docsrs, doc(cfg(feature = "recency")))]
pub use recency::{
Generation, Generational, GenerationalAtomicStorage, GenerationalStorage, Recency,
};
Expand Down

0 comments on commit 3e886cf

Please sign in to comment.