diff --git a/shotover-proxy/tests/runner/observability_int_tests.rs b/shotover-proxy/tests/runner/observability_int_tests.rs index c1f4a0696..f95541c9a 100644 --- a/shotover-proxy/tests/runner/observability_int_tests.rs +++ b/shotover-proxy/tests/runner/observability_int_tests.rs @@ -13,6 +13,7 @@ async fn test_metrics() { let expected = r#" # TYPE shotover_available_connections_count gauge # TYPE shotover_chain_failures_count counter +# TYPE shotover_chain_messages_per_batch_count summary # TYPE shotover_chain_requests_batch_size summary # TYPE shotover_chain_responses_batch_size summary # TYPE shotover_chain_total_count counter @@ -23,6 +24,16 @@ async fn test_metrics() { # TYPE shotover_transform_total_count counter shotover_available_connections_count{source="redis"} shotover_chain_failures_count{chain="redis"} +shotover_chain_messages_per_batch_count_count{chain="redis"} +shotover_chain_messages_per_batch_count_sum{chain="redis"} +shotover_chain_messages_per_batch_count{chain="redis",quantile="0"} +shotover_chain_messages_per_batch_count{chain="redis",quantile="0.1"} +shotover_chain_messages_per_batch_count{chain="redis",quantile="0.5"} +shotover_chain_messages_per_batch_count{chain="redis",quantile="0.9"} +shotover_chain_messages_per_batch_count{chain="redis",quantile="0.95"} +shotover_chain_messages_per_batch_count{chain="redis",quantile="0.99"} +shotover_chain_messages_per_batch_count{chain="redis",quantile="0.999"} +shotover_chain_messages_per_batch_count{chain="redis",quantile="1"} shotover_chain_requests_batch_size_count{chain="redis"} shotover_chain_requests_batch_size_sum{chain="redis"} shotover_chain_requests_batch_size{chain="redis",quantile="0"} diff --git a/shotover/src/transforms/chain.rs b/shotover/src/transforms/chain.rs index 2dfd5db34..35a9b2e91 100644 --- a/shotover/src/transforms/chain.rs +++ b/shotover/src/transforms/chain.rs @@ -246,6 +246,9 @@ impl TransformChainBuilder { } ).collect(); + // This is deprecated but give users some time to migrate to the requests/responses versions that have replaced this metric + histogram!("shotover_chain_messages_per_batch_count", "chain" => name).record(0); + let chain_requests_batch_size = histogram!("shotover_chain_requests_batch_size", "chain" => name); let chain_responses_batch_size =