-
Notifications
You must be signed in to change notification settings - Fork 159
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
feat: prometheus metrics for RPC methods #4607
Conversation
@lemmih is it WIP or ready to review? |
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.
rpc_processing_time_count{method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="0.01",method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="0.02",method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="0.04",method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="0.08",method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="0.16",method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="0.32",method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="0.64",method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="1.28",method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="2.56",method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="5.12",method="Filecoin.NodeStatus"} 9
rpc_processing_time_bucket{le="+Inf",method="Filecoin.NodeStatus"} 9
Can we avoid so many records?
We could track just p50, p90 and p99. But we would still have hundreds of metrics. I say we wait and see if the large number of metrics causes any problems / unexpected costs. |
// Histogram with 10 buckets starting from 0.01s going to 5.12s, each bucket twice as big as the last. | ||
Histogram::new(exponential_buckets(0.01, 2.0, 10)) | ||
}); | ||
crate::metrics::default_registry().register( |
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.
Hi, I'm curious. Is there a particular reason we do not use DEFAULT_REGISTRY.write()
here?
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.
the default_registry()
hides the detail that the registry is under an RwLock
.
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.
But, I see that all other metrics use DEFAULT_REGISTRY.write()
in this file.
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.
They likely shouldn't. :)
Summary of changes
Changes introduced in this pull request:
The new metrics look like this:
Reference issue to close (if applicable)
Closes #3767
Other information and links
Change checklist