mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 22:35:41 +00:00
Add tracing logic in pallet macro for hooks and dispatchables (#8305)
* span in hooks * add span for dispatchable * Update frame/support/src/lib.rs * Update frame/support/src/lib.rs Co-authored-by: David <dvdplm@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: David <dvdplm@gmail.com>
This commit is contained in:
committed by
GitHub
parent
1f911ddb61
commit
1602f8dd2d
@@ -162,9 +162,13 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream {
|
||||
) -> #frame_support::dispatch::DispatchResultWithPostInfo {
|
||||
match self {
|
||||
#(
|
||||
Self::#fn_name( #( #args_name, )* ) =>
|
||||
Self::#fn_name( #( #args_name, )* ) => {
|
||||
#frame_support::sp_tracing::enter_span!(
|
||||
#frame_support::sp_tracing::trace_span!(stringify!(#fn_name))
|
||||
);
|
||||
<#pallet_ident<#type_use_gen>>::#fn_name(origin, #( #args_name, )* )
|
||||
.map(Into::into).map_err(Into::into),
|
||||
.map(Into::into).map_err(Into::into)
|
||||
},
|
||||
)*
|
||||
Self::__Ignore(_, _) => {
|
||||
let _ = origin; // Use origin for empty Call enum
|
||||
|
||||
Reference in New Issue
Block a user