-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add discovery response metrics to Agent (#665)
* add Akri Discovery Response Result metric Signed-off-by: Johnson Shih <jshih@microsoft.com> * add Akri Discovery Response latency metric Signed-off-by: Johnson Shih <jshih@microsoft.com> * separate metrics data to a file Signed-off-by: Johnson Shih <jshih@microsoft.com> * Update patch version Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * update patch version Signed-off-by: Johnson Shih <jshih@microsoft.com> --------- Signed-off-by: Johnson Shih <jshih@microsoft.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
632035e
commit cc29959
Showing
21 changed files
with
98 additions
and
45 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use lazy_static::lazy_static; | ||
use prometheus::{opts, register_int_counter_vec, HistogramVec, IntCounterVec, IntGaugeVec}; | ||
|
||
// Discovery request response time bucket (in seconds) | ||
const DISCOVERY_RESPONSE_TIME_BUCKETS: &[f64; 9] = | ||
&[0.25, 0.5, 1.0, 1.5, 2.0, 3.0, 5.0, 10.0, 60.0]; | ||
|
||
lazy_static! { | ||
// Reports the number of Instances visible to this node, grouped by Configuration and whether it is shared | ||
pub static ref INSTANCE_COUNT_METRIC: IntGaugeVec = prometheus::register_int_gauge_vec!( | ||
"akri_instance_count", | ||
"Akri Instance Count", | ||
&["configuration", "is_shared"]) | ||
.expect("akri_instance_count metric can be created"); | ||
// Reports the time to get discovery results, grouped by Configuration | ||
pub static ref DISCOVERY_RESPONSE_TIME_METRIC: HistogramVec = prometheus::register_histogram_vec!( | ||
"akri_discovery_response_time", | ||
"Akri Discovery Response Time", | ||
&["configuration"], | ||
DISCOVERY_RESPONSE_TIME_BUCKETS.to_vec() | ||
) | ||
.expect("akri_discovery_response_time metric can be created"); | ||
// Reports the result of discover requests, grouped by Discovery Handler name and whether it is succeeded | ||
pub static ref DISCOVERY_RESPONSE_RESULT_METRIC: IntCounterVec = register_int_counter_vec!( | ||
opts!("akri_discovery_response_result", "Akri Discovery Response Result"), | ||
&["discovery_handler_name", "result"]) | ||
.expect("akri_discovery_response_result metric can be created"); | ||
} |
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
2 changes: 1 addition & 1 deletion
2
discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml
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
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
Oops, something went wrong.