Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fccf41d
feat(metrics): add classic histogram support
ethanolchik Jul 15, 2026
fbee146
feat(metrics): add support for TimeHistogram
ethanolchik Jul 16, 2026
9129dda
fix(metrics): expose snapshots and fix timer must-use message
ethanolchik Jul 20, 2026
535ae20
feat(metrics): add native histogram support
ethanolchik Jul 20, 2026
75a677f
feat(metrics): accept iterable time histogram buckets
ethanolchik Jul 21, 2026
2954308
refactor(metrics): create seconds function
ethanolchik Jul 21, 2026
1da1721
refactor(metrics): pre-sort histogram buckets
ethanolchik Jul 21, 2026
9a48173
chore(metrics): accredit prometools adaptations
ethanolchik Jul 21, 2026
9e0797d
fix(metrics): sort TimeHistogram buckets
ethanolchik Jul 23, 2026
47dd783
fix(metrics): track native histogram panic callers
ethanolchik Jul 23, 2026
a94f100
feat(metrics): expose Histogram::snapshot
ethanolchik Jul 27, 2026
8cfd523
fix(metrics): report native histogram config panics at the caller
ethanolchik Jul 27, 2026
ce64737
feat(metrics): add collection pipeline
ethanolchik Jul 21, 2026
4198345
feat(metrics): wire up protobuf and text encoders
ethanolchik Jul 21, 2026
3e091e8
test(metrics): cover legacy info metric encoding
ethanolchik Jul 23, 2026
207ef1a
docs(metrics-registry): clarify that EncodeMetric::encode must emit c…
ethanolchik Jul 24, 2026
746496b
refactor(metrics-registry): derive Debug for RegistrationMetadata
ethanolchik Jul 24, 2026
68a9324
feat(metrics): encode summaries and gauge histograms
ethanolchik Jul 24, 2026
1746521
fix(metrics): omit the OpenMetrics help line when there is no help text
ethanolchik Jul 27, 2026
94f88a0
feat(metrics): validate and sanitize names, labels, and exemplars
ethanolchik Jul 21, 2026
8b3947b
refactor(metrics): add support for UTF-8 characters in metric & label…
ethanolchik Jul 23, 2026
db61f80
fix(validation): remove duplicate assertions
ethanolchik Jul 23, 2026
9795818
test(metrics): cover validated summary and gauge histogram output
ethanolchik Jul 24, 2026
c5b338a
fix(metrics): quote label names only when they need UTF-8 syntax
ethanolchik Jul 27, 2026
e11649d
feat(metrics): add exemplar metrics
ethanolchik Jul 23, 2026
aa9bb89
test(metrics): update exemplar fixtures for UTF-8 names
ethanolchik Jul 23, 2026
ea4b084
refactor(metrics): reuse native histogram builder for exemplars
ethanolchik Jul 24, 2026
4234ce5
Merge branch 'main' into validation-and-utf8
ethanolchik Jul 28, 2026
28ab496
Merge branch 'validation-and-utf8' into metrics/exemplar-metrics
ethanolchik Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions foundations-metrics-registry/src/encode_metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ use crate::proto::MetricFamily;
/// metric or series that fails, so an empty `Vec` is a valid result.
pub trait EncodeMetric: Send + Sync + 'static {
/// Encodes this metric into zero or more [`MetricFamily`] messages.
///
/// Every returned [`MetricFamily`] must set `name` to a complete, non-empty
/// producer-level name.
fn encode(&self) -> Vec<MetricFamily>;
}
2 changes: 1 addition & 1 deletion foundations-metrics-registry/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// [`register`](crate::register). Build it from [`default`](Self::default) plus
/// the setters, since downstream crates can't use a struct literal.
#[non_exhaustive]
#[derive(Clone, Default)]
#[derive(Clone, Debug, Default)]
pub struct RegistrationMetadata {
/// Whether the metric is exported only when optional metrics are requested.
pub optional: bool,
Expand Down
3 changes: 2 additions & 1 deletion foundations-metrics-registry/src/proto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
mod model;

pub use model::{
Bucket, BucketSpan, Counter, Gauge, Histogram, LabelPair, Metric, MetricFamily, MetricType,
Bucket, BucketSpan, Counter, Exemplar, Gauge, Histogram, LabelPair, Metric, MetricFamily,
MetricType, Quantile, Summary,
};

#[cfg(test)]
Expand Down
2 changes: 2 additions & 0 deletions foundations-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ prometheus-client = { version = "0.25.0", features = [
serde = { workspace = true, features = ["derive"] }
ryu = "1.0.23"
parking_lot = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }

[lints]
workspace = true
Loading