Registry / observability / sentry-tracing

sentry-tracing

JSON →
library0.47.0rscratesunverified

Sentry integration for the tracing and tracing-subscriber crates, enabling error and span reporting to Sentry.

# Cargo.toml [dependencies] sentry-tracing = "0.47.0"
INSTALL
IMPORT
SIG · SENTRY-TRACING
S
sentry-tracing
observabilityrustv0.47.0
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.

SentryLayer
use sentry_tracing::SentryLayer;

Initialize Sentry and attach the tracing layer to capture spans and events.

use sentry_tracing::SentryLayer; use tracing_subscriber::prelude::*; fn main() { let _guard = sentry::init(("https://examplePublicKey@o0.ingest.sentry.io/0", sentry::ClientOptions::default())); tracing_subscriber::registry() .with(SentryLayer::new()) .init(); tracing::info!("Hello, Sentry!"); }
Debug
Known issues
gotchaRequires a running Sentry DSN; without it, events are silently dropped.
fix
Set the SENTRY_DSN environment variable or pass a DSN to sentry::init.
affects: >=0.1.0
Upgrade
Version history
0.47.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Amazon
1
Resources
sentry-tracing — cargo add sentry-tracing · libregistry