New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add metrics for key exceed bound #4255
add metrics for key exceed bound #4255
Conversation
Signed-off-by: zhangjinpeng1987 <zhangjinpeng@pingcap.com>
Signed-off-by: zhangjinpeng1987 <zhangjinpeng@pingcap.com>
@@ -221,4 +221,10 @@ lazy_static! { | |||
&["type"], | |||
exponential_buckets(0.001, 1.59, 20).unwrap() // max 10s | |||
).unwrap(); | |||
|
|||
pub static ref KEY_NOT_IN_REGION: IntCounter = register_int_counter!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to add a label so we can locate where it raises?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not a good idea. Constant labels are preferred. Dynamic labels are likely to cause memory never being released because these metric instance need to be kept permanently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
Signed-off-by: zhangjinpeng1987 <zhangjinpeng@pingcap.com>
Signed-off-by: zhangjinpeng1987 zhangjinpeng@pingcap.com
What are the type of the changes? (mandatory)
The currently defined types are listed below, please pick one of the types for this PR by removing the others:
How has this PR been tested? (mandatory)
No
Does this PR affect documentation (docs) update? (mandatory)
No
Does this PR affect tidb-ansible update? (mandatory)
No