feat(import): complete OpenAPI onboarding and verify delivery
This commit is contained in:
1 parent
bb3e376767
commit
e93de7015a
244 files changed
+57020
-5139
No files matched your search
@@ -9,8 +9,8 @@ use crate::labels::{
|
||||
pub const METRIC_SCHEMA_VERSION: u32 = 1;
|
||||
pub const MAX_METRIC_FAMILIES: usize = 128;
|
||||
pub const MAX_PRODUCT_LABELS_PER_FAMILY: usize = 4;
|
||||
pub const MAX_LOGICAL_SERIES_PER_PROCESS: usize = 5_250;
|
||||
pub const MAX_RENDERED_SERIES_PER_PROCESS: usize = 16_750;
|
||||
pub const MAX_LOGICAL_SERIES_PER_PROCESS: usize = 5_563;
|
||||
pub const MAX_RENDERED_SERIES_PER_PROCESS: usize = 17_638;
|
||||
pub const MAX_EXPOSITION_BYTES: usize = 8 * 1024 * 1024;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
@@ -180,9 +180,14 @@ pub const HTTP_ROUTE_DOMAIN: &[&str] = &[
|
||||
"/api/admin/workspaces/{workspace_id}/onboarding",
|
||||
"/api/admin/workspaces/{workspace_id}/onboarding/events",
|
||||
"/api/admin/workspaces/{workspace_id}/onboarding/reset-selection",
|
||||
"/api/admin/workspaces/{workspace_id}/onboarding/import-context",
|
||||
"/api/admin/workspaces/{workspace_id}/onboarding/select-draft",
|
||||
"/api/admin/workspaces/{workspace_id}/operations",
|
||||
"/api/admin/workspaces/{workspace_id}/imports/openapi/preview",
|
||||
"/api/admin/workspaces/{workspace_id}/imports/openapi/{job_id}/create",
|
||||
"/api/admin/workspaces/{workspace_id}/imports/openapi/{job_id}/plans",
|
||||
"/api/admin/workspaces/{workspace_id}/imports/openapi/plans/{plan_id}",
|
||||
"/api/admin/workspaces/{workspace_id}/imports/openapi/{plan_id}/apply",
|
||||
"/api/admin/workspaces/{workspace_id}/operations/analyze-quality",
|
||||
"/api/admin/workspaces/{workspace_id}/operations/import",
|
||||
"/api/admin/workspaces/{workspace_id}/operations/{operation_id}",
|
||||
@@ -304,7 +309,7 @@ const METRIC_SCHEMA: &[MetricDefinition] = &[
|
||||
],
|
||||
&[],
|
||||
BOTH,
|
||||
67 * 10 * 6,
|
||||
HTTP_ROUTE_DOMAIN.len() * 10 * 6,
|
||||
"Total HTTP requests.",
|
||||
),
|
||||
metric(
|
||||
@@ -318,7 +323,7 @@ const METRIC_SCHEMA: &[MetricDefinition] = &[
|
||||
],
|
||||
DURATION_BUCKETS_SECONDS,
|
||||
BOTH,
|
||||
67 * 10,
|
||||
HTTP_ROUTE_DOMAIN.len() * 10,
|
||||
"HTTP request duration in seconds.",
|
||||
),
|
||||
metric(
|
||||
|
||||
@@ -46,16 +46,16 @@ fn schema_v1_is_complete_deterministic_and_inside_the_frozen_budget() {
|
||||
|
||||
#[test]
|
||||
fn frozen_budget_edges_are_exact() {
|
||||
assert!(validate_budget(5_249, 16_749).is_ok());
|
||||
assert!(validate_budget(5_250, 16_750).is_ok());
|
||||
assert!(validate_budget(5_251, 16_000).is_err());
|
||||
assert!(validate_budget(5_200, 16_751).is_err());
|
||||
assert_eq!(crank_metrics::max_exemplar_slots(), 10_570);
|
||||
assert!(validate_budget(5_562, 17_637).is_ok());
|
||||
assert!(validate_budget(5_563, 17_638).is_ok());
|
||||
assert!(validate_budget(5_564, 16_000).is_err());
|
||||
assert!(validate_budget(5_200, 17_639).is_err());
|
||||
assert_eq!(crank_metrics::max_exemplar_slots(), 11_270);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_registered_route_round_trips_without_dynamic_segments() {
|
||||
assert_eq!(HTTP_ROUTE_DOMAIN.len(), 67);
|
||||
assert_eq!(HTTP_ROUTE_DOMAIN.len(), 72);
|
||||
for route in HTTP_ROUTE_DOMAIN {
|
||||
assert_eq!(HttpRoute::from_matched_path(route).as_str(), *route);
|
||||
assert!(!route.contains("trace_id"));
|
||||
@@ -68,8 +68,8 @@ fn canonical_schema_validation_reports_its_category() {
|
||||
assert_eq!(
|
||||
schema_budget(),
|
||||
Ok(crank_metrics::SchemaBudget {
|
||||
logical_series: 5_213,
|
||||
rendered_series: 16_538
|
||||
logical_series: 5_563,
|
||||
rendered_series: 17_638
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user