-
-
Notifications
You must be signed in to change notification settings - Fork 172
Closed
Labels
BugSomething isn't workingSomething isn't working
Description
Steps to Reproduce
Run the following example:
use axum::routing;
use axum::{extract::Request, Router};
use tower;
async fn handler() -> String {
let parent_span = sentry::configure_scope(|scope| scope.get_span());
if let Some(sentry::TransactionOrSpan::Transaction(tx)) = parent_span {
let span = tx.start_child("span operation", "span description");
span.finish();
}
panic!("oh no");
}
#[tokio::main]
async fn main() {
let _guard = sentry::init((
"https://6b76fb2a5dc1164849cd797b75b6d879@o447951.ingest.us.sentry.io/4508694563782656",
sentry::ClientOptions {
release: sentry::release_name!(),
traces_sample_rate: 1.0,
debug: true,
..Default::default()
},
));
let app = Router::new().route("/", routing::get(handler)).layer(
tower::ServiceBuilder::new()
.layer(sentry_tower::NewSentryLayer::<Request>::new_from_top())
.layer(sentry_tower::SentryHttpLayer::with_transaction()),
);
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
axum::serve(listener, app).await.unwrap();
}Expected Result
- The "GET /" transaction and the manually created span are captured
- The trace and transaction are marked as errored, the transaction associated with the issue corresponding to the panic
Actual Result
Only the panic is reported, with a fake trace ("Missing Trace Spans")

Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working
