If we're attempting to catch a fallible operation, we could also use the err_lvl if the instrumented function panics, or let you set a panic level specifically.
Generally, Rust methods shouldn't panic, but sometimes it happens, and that's something you'll want to know about. The most straightforward way to do this would be to make our default span completion check if it's panicking and complete using the error or panic level, along with a generic err property that suggests the method panicked. If you want to actually catch that panic and report a more useful error then you can do so through panic::catch_unwind.
If we're attempting to catch a fallible operation, we could also use the
err_lvl
if the instrumented function panics, or let you set a panic level specifically.Generally, Rust methods shouldn't panic, but sometimes it happens, and that's something you'll want to know about. The most straightforward way to do this would be to make our default span completion check if it's panicking and complete using the error or panic level, along with a generic
err
property that suggests the method panicked. If you want to actually catch that panic and report a more useful error then you can do so throughpanic::catch_unwind
.