Skip to main content

Module stack_sample

Module stack_sample 

Source
Expand description

Nested message and enum types in StackSample.

Modules§

counter_descriptor
Nested message and enum types in CounterDescriptor.

Structs§

AsyncContextDescriptor
Describes an async context referenced by TaskContext.async_id: a stackful unit of execution that is not an OS thread (goroutine, fiber, coroutine).
CounterDescriptor
Describes a counter: a named, typed quantity a sample is measured against (the sampling timebase) or observed alongside (a follower). Values live on the sample as weights; this only describes their meaning.
ExecutionContext
The execution state a sample was taken in. All fields are optional: an off-CPU sample (e.g. a wall-clock sampler catching a sleeping thread) has no meaningful cpu or mode.
TaskContext
The task an observation is attributed to. At least one of pid / tid / async_id should be set. async_id identifies a stackful async context (goroutine, fiber, …) described by an AsyncContextDescriptor whose iid equals the async_id.

Enums§

CallstackField
The captured callstack, bottom frame first. Give it fully inline via callstack or reference an interned Callstack via callstack_iid.
ExecutionContextField
The execution state (cpu, privilege mode) at sample time. Absent for samplers that observe off-CPU tasks. Give it inline via execution_context or reference an interned ExecutionContext via execution_context_iid.
Mode
The privilege level a sample was taken at. Append-only: never renumber or repurpose an existing value.
PrimaryDescriptorField
The sampling timebase: the counter this sample’s weight is measured against. Set one of the two; may be omitted entirely if declared in StackSampleDefaults.primary_descriptor.
TaskContextField
The task (thread / process / async context) this sample is attributed to. Give it inline via task_context or reference an interned TaskContext via task_context_iid.
Unit
The unit a CounterDescriptor’s values are expressed in. Append-only: new units may be added, but existing values are never renumbered or repurposed. If none of these fit, set CounterDescriptor.unit_str instead.
UnwindErrorField
Set if stack unwinding was incomplete; describes the data, not producer internal state. Give it inline via unwind_error or reference an interned string via unwind_error_iid.