-
Notifications
You must be signed in to change notification settings - Fork 69
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
Instrument producer_plugin for Prometheus #537
Instrument producer_plugin for Prometheus #537
Conversation
@@ -154,6 +154,7 @@ class chain_plugin_impl { | |||
fc::microseconds abi_serializer_max_time_us; | |||
std::optional<bfs::path> snapshot_path; | |||
|
|||
std::shared_ptr<chain_plugin_metrics> chain_metrics; |
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.
What necessitates this being a shared_ptr
over a unique_ptr
, or even just returning a reference to a const chain_plugin_metrics&
?
plugins/chain_interface/include/eosio/chain/plugin_interface.hpp
Outdated
Show resolved
Hide resolved
struct runtime_metric { | ||
metric_type type; | ||
const std::string family; | ||
const std::string label; | ||
std::atomic<int64_t> value; |
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.
This should be initialized.
plugins/producer_plugin/include/eosio/producer_plugin/producer_plugin.hpp
Outdated
Show resolved
Hide resolved
plugins/prometheus_plugin/include/eosio/prometheus_plugin/prometheus_plugin.hpp
Outdated
Show resolved
Hide resolved
|
||
for (auto& rtm : _counters) { | ||
auto new_val = static_cast<double>(std::get<2>(rtm).value); | ||
std::get<1>(rtm).Increment(new_val-std::get<1>(rtm).Value()); |
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.
Did you decide this was not needed?
@@ -832,6 +832,10 @@ class read_write { | |||
|
|||
} // namespace chain_apis | |||
|
|||
struct chain_plugin_metrics { | |||
//runtime_metric |
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 assume this will be cleaned up with the chain_plugin PR to the feature branch.
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.
yes, changes for that are coming in the instrument chain plugin pr
…l-logging [3.2] Additional transaction/block time logging
Add a base set of metrics for to publish to Prometheus to the producer_plugin.