feat: freeze typed metrics registry and bounded exemplars

This commit is contained in:
2026-08-14 11:52:00 +03:00
parent 17c8e3a8f0
commit 8e709acea9
29 changed files with 1690 additions and 103 deletions
@@ -71,6 +71,18 @@ fn non_loopback_without_a_token_is_rejected_without_secret_data() {
assert!(!error.to_string().contains("token="));
}
#[test]
fn metrics_surface_rejects_an_unregistered_process_identity() {
let config = MetricsConfig::new(
true,
SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 9464),
None,
)
.unwrap();
let identity = ServiceIdentity::try_new("user-controlled", "0.3.1", "test").unwrap();
assert!(MetricsSurface::for_test(config, identity).is_err());
}
#[test]
fn schema_is_closed_and_uses_fixed_duration_buckets() {
let schema = metric_schema();