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 more