Skip to content

Commit

Permalink
Readd old metric as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai committed Sep 23, 2024
1 parent c08e6ec commit 39a02d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions shotover-proxy/tests/runner/observability_int_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"}
Expand Down
3 changes: 3 additions & 0 deletions shotover/src/transforms/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 39a02d2

Please sign in to comment.