-
Notifications
You must be signed in to change notification settings - Fork 173
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
fix(tracing): use tracing instrument macro #846
Conversation
… into na-use-tracing-instrument-macro
@@ -267,7 +251,7 @@ pub(crate) async fn execute_call<L: Logger>(c: Call<'_, L>) -> MethodResult { | |||
|
|||
let r = response.as_inner(); | |||
|
|||
rx_log_from_str(&r.result, max_log_length); | |||
tx_log_from_str(&r.result, max_log_length); |
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.
ooops, bug fix :P
fn execute_notification(notif: Notif, max_log_length: u32) -> MethodResponse { | ||
rx_log_from_json(¬if, max_log_length); | ||
let response = MethodResponse { result: String::new(), success: true }; | ||
tx_log_from_str(&response.result, max_log_length); |
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 is silly it would just be an empty string but yeye for consistency
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.
Nice!
Closes #844
It relies on
instrument
macro so we don't have to bother thinking about whether it's async or sync context :)I introduced a few bugs related that in the past and hopefully never again now