This commit is contained in:
Mateusz Gruszczyński committed 2026-10-05 09:30:21 +02:00
1 parent 1dea7f55c8
commit c819f0a335
151 files changed
+7610 -4264

No files matched your search

+13
View File
@@ -32,6 +32,7 @@ mod tests {
request_bytes: 10,
response_bytes: 20,
cache: "MISS",
source: "web_server",
user_agent: Some("test-agent".into()),
country: Some("PL".into()),
});
@@ -40,4 +41,16 @@ mod tests {
assert_eq!(view.client_ips[0].value, "203.0.113.7");
assert_eq!(view.client_ips[0].count, 1);
}
#[test]
fn prometheus_dimensions_are_fixed_cardinality() {
assert_eq!(method_family("GET"), "GET");
assert_eq!(method_family("PURGE"), "OTHER");
assert_eq!(
user_agent_family("Mozilla/5.0 Chrome/140.0 Safari/537.36"),
"chrome"
);
assert_eq!(user_agent_family("curl/8.12.1"), "curl");
assert_eq!(user_agent_family("ExampleBot/1.0"), "bot");
}
}