Move files in preparation for monorepo migration

This commit is contained in:
Jai A
2024-07-03 13:23:21 -07:00
parent 8140db32dd
commit a04cb54d86
232 changed files with 0 additions and 7116 deletions

View File

@@ -0,0 +1,18 @@
use tracing_error::ExtractSpanTrace;
pub fn display_tracing_error(err: &theseus::Error) {
match get_span_trace(err) {
Some(span_trace) => {
tracing::error!(error = %err, span_trace = %span_trace);
}
None => {
tracing::error!(error = %err);
}
}
}
pub fn get_span_trace<'a>(
error: &'a (dyn std::error::Error + 'static),
) -> Option<&'a tracing_error::SpanTrace> {
error.source().and_then(|e| e.span_trace())
}