diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2021-02-21 19:20:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-21 19:20:31 +0100 |
commit | 9d70ea2e9f03d7c12407f117cf11d2a99d55c8f8 (patch) | |
tree | af9699876b632ac452d0cd6214647cb3598eaec6 /runtime/ops/plugin.rs | |
parent | af93256d05993b53debe0552828b6ae7df521750 (diff) |
feat(unstable): per op metrics (#9240)
Diffstat (limited to 'runtime/ops/plugin.rs')
-rw-r--r-- | runtime/ops/plugin.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/runtime/ops/plugin.rs b/runtime/ops/plugin.rs index e972df046..424b1dca0 100644 --- a/runtime/ops/plugin.rs +++ b/runtime/ops/plugin.rs @@ -126,10 +126,13 @@ impl<'a> plugin_api::Interface for PluginInterface<'a> { _ => unreachable!(), } }; - self - .state - .op_table - .register_op(name, metrics_op(Box::new(plugin_op_fn))) + self.state.op_table.register_op( + name, + metrics_op( + Box::leak(Box::new(name.to_string())), + Box::new(plugin_op_fn), + ), + ) } } |