# Tracing Authors - tracing Span (Highlights)

## Metadata
**Review**:: [readwise.io](https://readwise.io/bookreview/57200855)
**Source**:: #from/readwise #from/reader
**Zettel**:: #zettel/fleeting
**Status**:: #x
**Authors**:: [[Tracing Authors]]
**Full Title**:: tracing Span
**Category**:: #articles #readwise/articles
**Category Icon**:: 📰
**URL**:: [docs.rs](https://docs.rs/tracing/latest/tracing/struct.Span.html)
**Host**:: [[docs.rs]]
**Highlighted**:: [[2025-12-30]]
**Created**:: [[2026-01-03]]
## Highlights
- For instrumenting asynchronous code, `tracing` provides the [`Future::instrument` combinator](https://docs.rs/tracing/latest/tracing/struct.Span.html/trait.Instrument.html) for attaching a span to a future (async function or block). This will enter the span *every* time the future is polled, and exit it whenever the future yields. ([View Highlight](https://read.readwise.io/read/01kdpkct3grgcf2c68zze9cc90)) ^971449544
- The [`#[instrument]` attribute macro](https://docs.rs/tracing/latest/tracing/struct.Span.html/attr.instrument.html) can automatically generate correct code when used on an async function ([View Highlight](https://read.readwise.io/read/01kdpkddnntkvf7da78rnwnky5)) ^971449559