Struct relay_event_schema::protocol::Frame

source ·
pub struct Frame {
Show 26 fields pub function: Annotated<String>, pub raw_function: Annotated<String>, pub symbol: Annotated<String>, pub module: Annotated<String>, pub package: Annotated<String>, pub filename: Annotated<NativeImagePath>, pub abs_path: Annotated<NativeImagePath>, pub lineno: Annotated<u64>, pub colno: Annotated<u64>, pub platform: Annotated<String>, pub pre_context: Annotated<Array<String>>, pub context_line: Annotated<String>, pub post_context: Annotated<Array<String>>, pub in_app: Annotated<bool>, pub vars: Annotated<FrameVars>, pub data: Annotated<FrameData>, pub image_addr: Annotated<Addr>, pub instruction_addr: Annotated<Addr>, pub addr_mode: Annotated<String>, pub function_id: Annotated<Addr>, pub symbol_addr: Annotated<Addr>, pub trust: Annotated<String>, pub lang: Annotated<String>, pub stack_start: Annotated<bool>, pub lock: Annotated<LockReason>, pub other: Object<Value>,
}
Expand description

Holds information about a single stacktrace frame.

Each object should contain at least a filename, function or instruction_addr attribute. All values are optional, but recommended.

Fields§

§function: Annotated<String>

Name of the frame’s function. This might include the name of a class.

This function name may be shortened or demangled. If not, Sentry will demangle and shorten it for some platforms. The original function name will be stored in raw_function.

§raw_function: Annotated<String>

A raw (but potentially truncated) function value.

The original function name, if the function name is shortened or demangled. Sentry shows the raw function when clicking on the shortened one in the UI.

If this has the same value as function it’s best to be omitted. This exists because on many platforms the function itself contains additional information like overload specifies or a lot of generics which can make it exceed the maximum limit we provide for the field. In those cases then we cannot reliably trim down the function any more at a later point because the more valuable information has been removed.

The logic to be applied is that an intelligently trimmed function name should be stored in function and the value before trimming is stored in this field instead. However also this field will be capped at 256 characters at the moment which often means that not the entire original value can be stored.

§symbol: Annotated<String>

Potentially mangled name of the symbol as it appears in an executable.

This is different from a function name by generally being the mangled name that appears natively in the binary. This is relevant for languages like Swift, C++ or Rust.

§module: Annotated<String>

Name of the module the frame is contained in.

Note that this might also include a class name if that is something the language natively considers to be part of the stack (for instance in Java).

§package: Annotated<String>

Name of the package that contains the frame.

For instance this can be a dylib for native languages, the name of the jar or .NET assembly.

§filename: Annotated<NativeImagePath>

The source file name (basename only).

§abs_path: Annotated<NativeImagePath>

Absolute path to the source file.

§lineno: Annotated<u64>

Line number within the source file, starting at 1.

§colno: Annotated<u64>

Column number within the source file, starting at 1.

§platform: Annotated<String>

Which platform this frame is from.

This can override the platform for a single frame. Otherwise, the platform of the event is assumed. This can be used for multi-platform stack traces, such as in React Native.

§pre_context: Annotated<Array<String>>

Source code leading up to lineno.

§context_line: Annotated<String>

Source code of the current line (lineno).

§post_context: Annotated<Array<String>>

Source code of the lines after lineno.

§in_app: Annotated<bool>

Override whether this frame should be considered part of application code, or part of libraries/frameworks/dependencies.

Setting this attribute to false causes the frame to be hidden/collapsed by default and mostly ignored during issue grouping.

§vars: Annotated<FrameVars>

Mapping of local variables and expression names that were available in this frame.

§data: Annotated<FrameData>

Auxiliary information about the frame that is platform specific.

§image_addr: Annotated<Addr>

(C/C++/Native) Start address of the containing code module (image).

§instruction_addr: Annotated<Addr>

(C/C++/Native) An optional instruction address for symbolication.

This should be a string with a hexadecimal number that includes a 0x prefix. If this is set and a known image is defined in the [Debug Meta Interface]({%- link _documentation/development/sdk-dev/event-payloads/debugmeta.md -%}), then symbolication can take place.

§addr_mode: Annotated<String>

Defines the addressing mode for addresses.

This can be:

  • "abs" (the default): instruction_addr is absolute.
  • "rel:$idx": instruction_addr is relative to the debug_meta.image identified by its index in the list.
  • "rel:$uuid": instruction_addr is relative to the debug_meta.image identified by its debug_id.

If one of the "rel:XXX" variants is given together with function_id, the instruction_addr is relative to the uniquely identified function in the references debug_meta.image.

§function_id: Annotated<Addr>

(.NET) The function id / index that uniquely identifies a function inside a module.

This is the MetadataToken of a .NET MethodBase.

§symbol_addr: Annotated<Addr>

(C/C++/Native) Start address of the frame’s function.

We use the instruction address for symbolication, but this can be used to calculate an instruction offset automatically.

§trust: Annotated<String>

(C/C++/Native) Used for native crashes to indicate how much we can “trust” the instruction_addr

§lang: Annotated<String>

The language of the frame if it overrides the stacktrace language.

§stack_start: Annotated<bool>

Marks this frame as the bottom of a chained stack trace.

Stack traces from asynchronous code consist of several sub traces that are chained together into one large list. This flag indicates the root function of a chained stack trace. Depending on the runtime and thread, this is either the main function or a thread base stub.

This field should only be specified when true.

§lock: Annotated<LockReason>

A possible lock (java monitor object) held by this frame.

§other: Object<Value>

Additional arbitrary fields for forwards compatibility.

Trait Implementations§

source§

impl Clone for Frame

source§

fn clone(&self) -> Frame

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 Frame

source§

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

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

impl Default for Frame

source§

fn default() -> Frame

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

impl Empty for Frame

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 FromValue for Frame

source§

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

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

impl IntoValue for Frame

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 Frame

source§

fn eq(&self, other: &Frame) -> 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 Frame

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 Frame

Auto Trait Implementations§

§

impl Freeze for Frame

§

impl RefUnwindSafe for Frame

§

impl Send for Frame

§

impl Sync for Frame

§

impl Unpin for Frame

§

impl UnwindSafe for Frame

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