Struct relay_event_schema::protocol::RawStacktrace
source · pub struct RawStacktrace {
pub frames: Annotated<Array<Frame>>,
pub registers: Annotated<Object<RegVal>>,
pub instruction_addr_adjustment: Annotated<InstructionAddrAdjustment>,
pub lang: Annotated<String>,
pub snapshot: Annotated<bool>,
pub other: Object<Value>,
}
Expand description
A stack trace of a single thread.
A stack trace contains a list of frames, each with various bits (most optional) describing the context of that frame. Frames should be sorted from oldest to newest.
For the given example program written in Python:
def foo():
my_var = 'foo'
raise ValueError()
def main():
foo()
A minimalistic stack trace for the above program in the correct order:
{
"frames": [
{"function": "main"},
{"function": "foo"}
]
}
The top frame fully symbolicated with five lines of source context:
{
"frames": [{
"in_app": true,
"function": "myfunction",
"abs_path": "/real/file/name.py",
"filename": "file/name.py",
"lineno": 3,
"vars": {
"my_var": "'value'"
},
"pre_context": [
"def foo():",
" my_var = 'foo'",
],
"context_line": " raise ValueError()",
"post_context": [
"",
"def main():"
],
}]
}
A minimal native stack trace with register values. Note that the package
event attribute must
be “native” for these frames to be symbolicated.
{
"frames": [
{"instruction_addr": "0x7fff5bf3456c"},
{"instruction_addr": "0x7fff5bf346c0"},
],
"registers": {
"rip": "0x00007ff6eef54be2",
"rsp": "0x0000003b710cd9e0"
}
}
Fields§
§frames: Annotated<Array<Frame>>
Required. A non-empty list of stack frames. The list is ordered from caller to callee, or oldest to youngest. The last frame is the one creating the exception.
registers: Annotated<Object<RegVal>>
Register values of the thread (top frame).
A map of register names and their values. The values should contain the actual register values of the thread, thus mapping to the last frame in the list.
instruction_addr_adjustment: Annotated<InstructionAddrAdjustment>
Optional. A flag that indicates if, and how, instruction_addr
values need to be adjusted
before they are symbolicated.
lang: Annotated<String>
The language of the stacktrace.
snapshot: Annotated<bool>
Indicates that this stack trace is a snapshot triggered by an external signal.
If this field is false
, then the stack trace points to the code that caused this stack
trace to be created. This can be the location of a raised exception, as well as an exception
or signal handler.
If this field is true
, then the stack trace was captured as part of creating an unrelated
event. For example, a thread other than the crashing thread, or a stack trace computed as a
result of an external kill signal.
other: Object<Value>
Additional arbitrary fields for forwards compatibility.
Trait Implementations§
source§impl Clone for RawStacktrace
impl Clone for RawStacktrace
source§fn clone(&self) -> RawStacktrace
fn clone(&self) -> RawStacktrace
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RawStacktrace
impl Debug for RawStacktrace
source§impl Default for RawStacktrace
impl Default for RawStacktrace
source§fn default() -> RawStacktrace
fn default() -> RawStacktrace
source§impl Empty for RawStacktrace
impl Empty for RawStacktrace
source§impl From<RawStacktrace> for Stacktrace
impl From<RawStacktrace> for Stacktrace
source§fn from(stacktrace: RawStacktrace) -> Stacktrace
fn from(stacktrace: RawStacktrace) -> Stacktrace
source§impl From<Stacktrace> for RawStacktrace
impl From<Stacktrace> for RawStacktrace
source§fn from(stacktrace: Stacktrace) -> RawStacktrace
fn from(stacktrace: Stacktrace) -> RawStacktrace
source§impl FromValue for RawStacktrace
impl FromValue for RawStacktrace
source§fn from_value(__value: Annotated<Value>) -> Annotated<Self>
fn from_value(__value: Annotated<Value>) -> Annotated<Self>
source§impl IntoValue for RawStacktrace
impl IntoValue for RawStacktrace
source§fn into_value(self) -> Value
fn into_value(self) -> Value
source§fn serialize_payload<S>(
&self,
__serializer: S,
__behavior: SkipSerialization,
) -> Result<S::Ok, S::Error>where
Self: Sized,
S: Serializer,
fn serialize_payload<S>(
&self,
__serializer: S,
__behavior: SkipSerialization,
) -> Result<S::Ok, S::Error>where
Self: Sized,
S: Serializer,
source§fn extract_child_meta(&self) -> MetaMapwhere
Self: Sized,
fn extract_child_meta(&self) -> MetaMapwhere
Self: Sized,
§fn extract_meta_tree(value: &Annotated<Self>) -> MetaTreewhere
Self: Sized,
fn extract_meta_tree(value: &Annotated<Self>) -> MetaTreewhere
Self: Sized,
source§impl PartialEq for RawStacktrace
impl PartialEq for RawStacktrace
source§impl ProcessValue for RawStacktrace
impl ProcessValue for RawStacktrace
source§fn value_type(&self) -> EnumSet<ValueType>
fn value_type(&self) -> EnumSet<ValueType>
source§fn process_value<P>(
&mut self,
__meta: &mut Meta,
__processor: &mut P,
__state: &ProcessingState<'_>,
) -> ProcessingResultwhere
P: Processor,
fn process_value<P>(
&mut self,
__meta: &mut Meta,
__processor: &mut P,
__state: &ProcessingState<'_>,
) -> ProcessingResultwhere
P: Processor,
source§fn process_child_values<P>(
&mut self,
__processor: &mut P,
__state: &ProcessingState<'_>,
) -> ProcessingResultwhere
P: Processor,
fn process_child_values<P>(
&mut self,
__processor: &mut P,
__state: &ProcessingState<'_>,
) -> ProcessingResultwhere
P: Processor,
impl StructuralPartialEq for RawStacktrace
Auto Trait Implementations§
impl Freeze for RawStacktrace
impl RefUnwindSafe for RawStacktrace
impl Send for RawStacktrace
impl Sync for RawStacktrace
impl Unpin for RawStacktrace
impl UnwindSafe for RawStacktrace
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)