Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Skip The [TODO: Code shorthand span ] Argument When Instrumenting Tracing On A Rust Function

rust
```cargo
[dependencies]
tracing = "0.1"
tracing-subscriber = "0.3"
```
use tracing::{Level, event, instrument};

fn main() {
  tracing_subscriber::fmt().with_ansi(false).init();
  let w = Widget{};
  w.instrument_with_self();
  w.instrument_without_self();
}

#[derive(Debug)]
pub struct Widget{}

impl Widget {
  #[instrument]
  pub fn instrument_with_self(&self) {
    event!(Level::INFO, "ping");
  }
  #[instrument(skip(self))]
  pub fn instrument_without_self(&self) {
    event!(Level::INFO, "ping");
  }
}
results start