foundations 5.10.2

A Rust service foundations library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Helpers shared by the integration tests.

use foundations::telemetry::metrics;
use foundations::telemetry::settings::MetricsSettings;

/// Collects every metric as text.
///
/// Goes through `collect` rather than `collect_format` so the helper works on
/// either backend; the `allow` covers the deprecation on the new one.
#[allow(dead_code, deprecated)]
pub(crate) fn collect_text(settings: &MetricsSettings) -> String {
    metrics::collect(settings).expect("metrics should be collectable")
}