-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
…m/custom_profiling Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
/// Add a custom profiler. | ||
pub fn with_custom_profiling( | ||
&mut self, | ||
custom_profiler: Box<dyn crate::TraceHandler>, |
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 mean you could have left the vector :P It was just about not taking a vec directly. But fine.
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.
IMO it doesn't make sense to have many of these, one is enough, since you can still multiplex further. However, we can change it to vec later if there is demand 😁
/// Create a runner for the command provided in argument. The `logger_hook` can be used to setup | ||
/// a custom profiler or update the logger configuration before it is initialized. | ||
/// | ||
/// Example: |
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.
👍
…m/custom_profiling
bot merge force |
Error: It's not possible to meet the minimal approval count of 1 in paritytech/cumulus#856 |
bot merge |
Error: Github API says paritytech/polkadot#4483 is not mergeable |
bot merge force |
Bot will approve on the behalf of @bkchr, since they are a team lead, in an attempt to reach the minimum approval count |
* Initial poc Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Make config available to logger hook Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Fix tests Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Add metric prefix option in sc_cli::RunCmd Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Remove print Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Review fixes Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fix docs Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* Initial poc Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Make config available to logger hook Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Fix tests Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Add metric prefix option in sc_cli::RunCmd Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Remove print Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Review fixes Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fix docs Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* Initial poc Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Make config available to logger hook Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Fix tests Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Add metric prefix option in sc_cli::RunCmd Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Remove print Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Review fixes Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fix docs Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
I'm aiming to leverage the WasmTracing infrastructure for emitting Prometheus metrics from wasm runtime - paritytech/polkadot#4383. I extended ProfilingLayer to work with multiple
TraceHandler
s. Since the entire logger and Profiling layer initialization is hidden deep in Substrate, I'm proposing to use a closure to inject changes inCliConfiguration::init()
implementation.In Polkadot we'll have a
TraceHandler
implementation that parsesTraceEvents
coming from wasm ("wasm_tracing") and publishes Prometheus metrics.Polkadot companion: paritytech/polkadot#4483
Cumulus companion: paritytech/cumulus#856