Install any skill in seconds. Free to start, no credit card required.
Get Started Free →hashintel/rust-tracing-practices
HASH tracing and instrumentation practices for Rust.
Passed 21 of 22 test cases with the skill, and 17 of 22 without it.
and 1 more in the full report
4 fixed17 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
In my Rust web handler, I caught a database error `db_err: sqlx::Error` (which implements `std::fmt::Display` and `std::fmt::Debug`). I want to log an error event using `tracing::error!`. Should I record this error with `?db_err` or `%db_err`? Write a single line `tracing::error!` call including `user_id` and the database error.
| Checked | Without skill | With skill |
|---|---|---|
| Uses Display formatting with a percent sign prefix for the db_err variable. | Missed | Passed |
| Uses lowercase prose for the log message string. | Missed | Passed |
The instructions your model reads when the skill loads.
info!, debug!, trace!, warn!, error!Display, using %error or error = %errorerror_stack::Report<Context> with Debug, using ?report or error = ?report on the complete report rather than its current_context() aloneThese fragments assume a local user. Their error events are alternatives: e is an ordinary error value, and report is an error_stack::Report<_>.
tracing::info!(user_id = user.id, action = "login", "user logged in successfully");
tracing::error!(error = %e, user_id = user.id, "failed to authenticate user");
tracing::error!(error = ?report, user_id = user.id, "failed to authenticate user");
A report's plain Display stops after the first context and omits attachments. Its Debug formatter traverses the frames and renders printable attachments or installed hook output.
#[tracing::instrument] attribute to functions to automatically create trace spanserr for an ordinary error and err(Debug) for an error_stack::Report<Context>skip(password) or skip_allfields(request_id = req.id())#[tracing::instrument(level = "debug", err, skip(password), fields(user_id = user.id))]
async fn authenticate_user(user: &User, password: &[u8]) -> Result<AuthToken, AuthError> {
// Implementation
}
test cases passed, vs 17 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.