relay_event_schema::protocol

Struct 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

source§

fn clone(&self) -> RawStacktrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RawStacktrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for RawStacktrace

source§

fn default() -> RawStacktrace

Returns the “default value” for a type. Read more
source§

impl Empty for RawStacktrace

source§

fn is_empty(&self) -> bool

Returns whether this value is empty.
source§

fn is_deep_empty(&self) -> bool

Returns whether this value is empty or all of its descendants are empty. Read more
source§

impl From<RawStacktrace> for Stacktrace

source§

fn from(stacktrace: RawStacktrace) -> Stacktrace

Converts to this type from the input type.
source§

impl From<Stacktrace> for RawStacktrace

source§

fn from(stacktrace: Stacktrace) -> RawStacktrace

Converts to this type from the input type.
source§

impl FromValue for RawStacktrace

source§

fn from_value(__value: Annotated<Value>) -> Annotated<Self>

Creates a meta structure from an annotated boxed value.
source§

impl IntoValue for RawStacktrace

source§

fn into_value(self) -> Value

Boxes the meta structure back into a value.
source§

fn serialize_payload<S>( &self, __serializer: S, __behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where Self: Sized, S: Serializer,

Efficiently serializes the payload directly.
source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

Extracts children meta map out of a value.
§

fn extract_meta_tree(value: &Annotated<Self>) -> MetaTree
where Self: Sized,

Extracts the meta tree out of annotated value. Read more
source§

impl PartialEq for RawStacktrace

source§

fn eq(&self, other: &RawStacktrace) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl ProcessValue for RawStacktrace

source§

fn value_type(&self) -> EnumSet<ValueType>

Returns the type of the value.
source§

fn process_value<P>( &mut self, __meta: &mut Meta, __processor: &mut P, __state: &ProcessingState<'_>, ) -> ProcessingResult
where P: Processor,

Executes a processor on this value.
source§

fn process_child_values<P>( &mut self, __processor: &mut P, __state: &ProcessingState<'_>, ) -> ProcessingResult
where P: Processor,

Recurses into children of this value.
source§

impl StructuralPartialEq for RawStacktrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T