Expand description
Nested message and enum types in StackSample.
Modules§
- counter_
descriptor - Nested message and enum types in
CounterDescriptor.
Structs§
- Async
Context Descriptor - Describes an async context referenced by TaskContext.async_id: a stackful unit of execution that is not an OS thread (goroutine, fiber, coroutine).
- Counter
Descriptor - 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.
- Execution
Context - 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.
- Task
Context - 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§
- Callstack
Field - The captured callstack, bottom frame first. Give it fully inline via
callstackor reference an interned Callstack viacallstack_iid. - Execution
Context Field - The execution state (cpu, privilege mode) at sample time. Absent for
samplers that observe off-CPU tasks. Give it inline via
execution_contextor reference an interned ExecutionContext viaexecution_context_iid. - Mode
- The privilege level a sample was taken at. Append-only: never renumber or repurpose an existing value.
- Primary
Descriptor Field - 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.
- Task
Context Field - The task (thread / process / async context) this sample is attributed to.
Give it inline via
task_contextor reference an interned TaskContext viatask_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.
- Unwind
Error Field - Set if stack unwinding was incomplete; describes the data, not producer
internal state. Give it inline via
unwind_erroror reference an interned string viaunwind_error_iid.