-
Notifications
You must be signed in to change notification settings - Fork 76
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
chore(sequencer): Add instrumentation #1368
base: main
Are you sure you want to change the base?
Conversation
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 think we should be using err(Debug)
throughout this PR since we're dealing with anyhow::Result
s, and they are usually fairly unhelpful if just Display
is used.
a8c9bfa
to
cd15920
Compare
Reverted |
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.
Overall good PR, but I would like to expand this PR, adding fields where needed.
When writing #1495 I started adding fields to the spans because without them the generated err
events will be hard to understand.
This will inevitably create tension when reading logs on stdout, but to understand error context there is no way around.
@@ -208,7 +208,7 @@ pub(crate) trait StateReadExt: StateRead + crate::assets::StateReadExt { | |||
Ok(balance) | |||
} | |||
|
|||
#[instrument(skip_all)] | |||
#[instrument(skip_all, err)] |
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.
Note on this T: AddressBytes
and all methods that contain a similar argument: in #1495 I have added logic to display the address. It would be very useful to get that context here.
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.
Tried to add similar fields wherever valuable in 2b30bf2 :)
## Summary Updates the rust toolchain used for all rust releated github jobs to and the containerfile to 1.81.0. ## Background Rust [1.81 was released](https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html) and comes with a load of niceties that we would like to use. Among them of immediate interest are: 1. lint reasons (#1521) 2. fixes `clippy::blocks_in_conditions` lint triggering on proc macros like `tracing::instrument` (which #1368 needed to work around) 3. lazy lock and lazy cell (to replace once_cell) in 1.80 (#1520) 4. checked cfg names (also 1.80 which flags a few issues in our code and should be immediately available). Note that this is orthgonal to setting the MSRV in individual Astria crates. ## Changes - Updates all github workflows to use the `1.81.0` toolchain (except for rustfmt and dylint, which need nightlies, respectively). - Fix all new clippy warnings. - Upgraded to the most recent dylint to make it compile again - Upgrade the single containerfile to use `rust:1.81-bookwarm` as the base image ## Related Issues Closes #1522
## Summary Updates the rust toolchain used for all rust releated github jobs to and the containerfile to 1.81.0. ## Background Rust [1.81 was released](https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html) and comes with a load of niceties that we would like to use. Among them of immediate interest are: 1. lint reasons (#1521) 2. fixes `clippy::blocks_in_conditions` lint triggering on proc macros like `tracing::instrument` (which #1368 needed to work around) 3. lazy lock and lazy cell (to replace once_cell) in 1.80 (#1520) 4. checked cfg names (also 1.80 which flags a few issues in our code and should be immediately available). Note that this is orthgonal to setting the MSRV in individual Astria crates. ## Changes - Updates all github workflows to use the `1.81.0` toolchain (except for rustfmt and dylint, which need nightlies, respectively). - Fix all new clippy warnings. - Upgraded to the most recent dylint to make it compile again - Upgrade the single containerfile to use `rust:1.81-bookwarm` as the base image ## Related Issues Closes #1522
Summary
Added instrumentation to
astria-sequencer
Background
Adding instrumentation to all async calls will aid in tracing since spans will be emitted even if no events happen under them.
Changes
clippy::blocks_in_conditions
lintRelated Issues
closes #1321