Registry / observability / tracing-error

tracing-error

JSON →
library0.2.1rscratesunverified

Utilities for enriching errors with tracing.

# Cargo.toml [dependencies] tracing-error = "0.2.1"
INSTALL
IMPORT
SIG · TRACING-ERROR
T
tracing-error
observabilityrustv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

InstrumentError
use tracing_error::InstrumentError;

Instrument an error with tracing context.

use tracing_error::InstrumentError; use tracing::info; let result: Result<(), _> = Err("something went wrong"); if let Err(e) = result { let instrumented = e.instrument_error(); info!("Error: {:?}", instrumented); }
Debug
Known issues
gotchaRequires tracing subscriber to be set up for full effect.
fix
Initialize a tracing subscriber (e.g., tracing_subscriber::fmt::init()) before using.
affects: >=0.1.0
Upgrade
Version history
0.2.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
tracing-error — cargo add tracing-error · libregistry