Skip to main content

sentry_backtrace/
lib.rs

1//! Backtrace Integration and utilities for sentry.
2//!
3//! Exposes functions to capture, process and convert/parse stacktraces, as well
4//! as integrations to process event stacktraces.
5
6#![doc(html_favicon_url = "https://sentry-brand.storage.googleapis.com/favicon.ico")]
7#![doc(html_logo_url = "https://sentry-brand.storage.googleapis.com/sentry-glyph-black.png")]
8
9mod integration;
10mod parse;
11mod process;
12mod trim;
13mod utils;
14
15pub use crate::integration::{
16    current_thread, AttachStacktraceIntegration, ProcessStacktraceIntegration,
17};
18pub use crate::parse::parse_stacktrace;
19pub use crate::process::{backtrace_to_stacktrace, process_event_stacktrace};
20pub use sentry_core::protocol::{Frame, Stacktrace};
21
22/// Returns the current backtrace as sentry stacktrace.
23pub fn current_stacktrace() -> Option<Stacktrace> {
24    backtrace_to_stacktrace(&backtrace::Backtrace::new())
25}