-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace static metrics with metrics with namespace from options
Metric subsystem_request_duration_seconds and cluster_health_status should also use custom namespace from opts instead of hardcoded elasticsearch.
- Loading branch information
1 parent
feac9db
commit 0acc473
Showing
6 changed files
with
66 additions
and
45 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,15 +1,11 @@ | ||
use serde_json::{Map, Value}; | ||
use serde_json::Value; | ||
|
||
#[derive(Debug, Deserialize)] | ||
pub(crate) struct CluserHealthResponse(Value); | ||
|
||
impl CluserHealthResponse { | ||
/// Inject labels into nodes response | ||
pub(crate) fn into_value(mut self, value_mangle: fn(&mut Map<String, Value>)) -> Value { | ||
if let Some(map) = self.0.as_object_mut() { | ||
value_mangle(map) | ||
} | ||
|
||
pub(crate) fn into_value(self) -> Value { | ||
self.0 | ||
} | ||
} |
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