-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
json metrics support is removed as it was decided we dont need it anymore
- Loading branch information
Showing
10 changed files
with
74 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mod observability_int_tests; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use crate::helpers::ShotoverManager; | ||
use serial_test::serial; | ||
use test_helpers::docker_compose::DockerCompose; | ||
|
||
#[test] | ||
#[serial] | ||
fn test_metrics() { | ||
let _compose = DockerCompose::new("examples/redis-passthrough/docker-compose.yml"); | ||
|
||
let shotover_manager = | ||
ShotoverManager::from_topology_file("examples/redis-passthrough/topology.yaml"); | ||
|
||
let mut connection = shotover_manager.redis_connection(6379); | ||
|
||
redis::cmd("SET") | ||
.arg("the_key") | ||
.arg(42) | ||
.execute(&mut connection); | ||
|
||
redis::cmd("SET") | ||
.arg("the_key") | ||
.arg(43) | ||
.execute(&mut connection); | ||
|
||
let body = reqwest::blocking::get("http://localhost:9001/metrics") | ||
.unwrap() | ||
.text() | ||
.unwrap(); | ||
|
||
// If the body contains these substrings, we can assume metrics are working | ||
assert!(body.contains("# TYPE shotover_transform_total counter")); | ||
assert!(body.contains("# TYPE shotover_chain_total counter")); | ||
assert!(body.contains("# TYPE shotover_available_connections gauge")); | ||
assert!(body.contains("# TYPE shotover_transform_latency summary")); | ||
assert!(body.contains("# TYPE shotover_chain_latency summary")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod admin; | ||
pub mod codec; | ||
mod helpers; | ||
pub mod redis_int_tests; |