Expand description
Field-shaped accessors for #[tracing::instrument(fields(...))].
Each function wraps a single VMI accessor so it returns a primitive
Option<T> instead of Result<Newtype<T>, VmiError>.
- Errors collapse to
None, which drops the field from the span instead of poisoning it with an error string. - Newtype wrappers like
ProcessId(u32)andView(u16)unwrap to their inner primitive, so structured-output subscribers emit a number rather than aDebug-formatted struct.
§Examples
ⓘ
#[tracing::instrument(
skip_all,
fields(
view = vmi::trace::event_view(vmi.event()),
pid = vmi::trace::current_process_id(vmi),
tid = vmi::trace::current_thread_id(vmi),
)
)]
fn dispatch(...) { ... }Structs§
- Hex
- A hexadecimal representation of a value.
Functions§
- current_
process_ id - Returns the process ID of the current process, if available.
- current_
process_ name - Returns the name of the current process, if available.
- current_
thread_ id - Returns the thread ID of the current thread, if available.
- event_
view - Returns the view of the given event, if available.
- process_
id - Returns the process ID of the given process, if available.
- process_
name - Returns the name of the process, if available.
- thread_
id - Returns the thread ID of the given thread, if available.
- user_
module_ name - Returns the name of the given user module, if available.