-
Notifications
You must be signed in to change notification settings - Fork 236
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
Replace opentelemetry by tikv/rust-prometheus #3869
Replace opentelemetry by tikv/rust-prometheus #3869
Conversation
03670c6
to
9e280ac
Compare
740425d
to
62ea525
Compare
network/src/network.rs
Outdated
"duration" => duration.as_secs().to_string(), | ||
"reason" => reason.clone(), | ||
); | ||
ckb_metrics::CKB_NETWORK_BAN_PEER.inc(); |
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.
We may add reason as a label, but let's defer it until we really need this.
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.
I think we can expose reason
to Prometheus, but it's preferable for reason
to be an enumerated value known at compile time. This way, reason
won't occupy too much memory space.
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.
It's easy to break, for example, if someone formats a message and adds the peer id into it.
62ea525
to
a1154db
Compare
a1154db
to
a4ae236
Compare
In current code base, metrics are always collected, but these metrics won't be exposed unless we specific We don't have a way to disable to collect metrics. @doitian Do we need to add a |
We can use a macro wrapper to turn the code like
into
|
Agreed, I will go ahead and implement it. |
63385ad
to
fc41b69
Compare
7c7e6fa
to
a1a66c8
Compare
In the current implementation, the values of "labels" exposed in ckb_message_bytes are difficult to understand as they are represented by numbers. like:
After communicating with @gpBlockchain, I should update the "labels" field with meaningful values, like:
Cc. @doitian |
ca51a1a
to
cfe9daf
Compare
cfe9daf
to
006a5b6
Compare
Considering use Histogram type to record |
04a6fd9
to
2841856
Compare
2841856
to
82b6e48
Compare
82b6e48
to
f03426f
Compare
What problem does this PR solve?
Issue Number: close #3866
Problem Summary:
This PR want to drop
opentelemetry
and replace it by rust-prometheus onutil/metrics
What is changed and how it works?
What's Changed:
Related changes
opentelemetry
, and replace it by rust-prometheusCheck List
Tests
Side effects
Release note