Parent: #234 · Blocked by: #250
Scope
End-to-end integration test: Rungu/CIRA → Sentry SDK → TrapFall. Verify events arrive correctly and display in dashboard.
Test Matrix
| Test |
SDK Config |
Expected TrapFall Result |
| Error capture |
SentryHttpLayer only |
Event in project with correct message, stacktrace, context |
| Panic capture |
panic!() in handler |
Event with mechanism: panic, thread name, stacktrace |
| Tracing bridge |
tracing::error!("msg") |
Event with logger integration, message |
| HTTP context |
GET /api/test → 500 |
Event with request URL, method, status code, headers |
| User context |
Authenticated request |
Event with user.id, user.email tags |
| DSN disabled |
SENTRY_DSN="" |
No events sent, no errors logged |
| Transaction NOT sent |
Default config |
Zero transaction envelopes (Phase 1) |
Test Infrastructure
#[cfg(test)]
mod integration {
use trapfall_test::TrapfallServer;
fn start_trapfall() -> TrapfallServer {
TrapfallServer::new()
.with_project("test-proj")
.start()
}
#[tokio::test]
async fn test_error_captured() {
let tf = start_trapfall();
let dsn = tf.project_dsn("test-proj");
let _guard = sentry::init(sentry::ClientOptions {
dsn: Some(dsn.parse().unwrap()),
..Default::default()
});
// Simulate Axum error
sentry::capture_message("test error", sentry::Level::Error);
// Flush
sentry::flush(some_timeout);
// Assert: event exists in TrapFall
let events = tf.get_events("test-proj").await;
assert_eq!(events.len(), 1);
assert_eq!(events[0].message, "test error");
}
}
Tasks
Effort: ~2 hours
Parent: #234 · Blocked by: #250
Scope
End-to-end integration test: Rungu/CIRA → Sentry SDK → TrapFall. Verify events arrive correctly and display in dashboard.
Test Matrix
SentryHttpLayeronlypanic!()in handlermechanism: panic, thread name, stacktracetracing::error!("msg")loggerintegration, messageuser.id,user.emailtagsSENTRY_DSN=""Test Infrastructure
Tasks
trapfall-testhelper crate (start TrapFall in-test, expose DSN, query events)Effort: ~2 hours