-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add obkv operation metrics (#1122)
## Rationale In one of our deployment, we see lots of obkv timeout requests, so we need to add some metrics for trouble shooting. ## Detailed Changes Add metrics for different obkv operations. ## Test Plan
- Loading branch information
1 parent
c7b8bd7
commit 7c3b107
Showing
5 changed files
with
46 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2023 CeresDB Project Authors. Licensed under Apache-2.0. | ||
|
||
use lazy_static::lazy_static; | ||
use prometheus::{exponential_buckets, register_histogram_vec, HistogramVec}; | ||
|
||
lazy_static! { | ||
// Buckets: 0.001, .., 0.001 * 2^15 = 32.7s | ||
pub static ref OBKV_OP_DURATION_HISTOGRAM: HistogramVec = register_histogram_vec!( | ||
"obkv_op_duration", | ||
"Histogram for duration of different obkv operations", | ||
&["type"], | ||
exponential_buckets(0.001, 2.0, 15).unwrap() | ||
) | ||
.unwrap(); | ||
} |
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