Skip to main content

Module core

Module core 

Available on crate feature dial9 only.
Expand description

Building blocks for extending dial9: implement a Source, write custom encoders, author custom segment processors, reach the raw recording modules.

Modules§

buffer
Rotating trace-segment buffers: the on-disk and in-memory sinks.
clock
Monotonic/realtime clock readings, the trace time base. Monotonic and realtime clock readings, the single time base for all trace timestamps.
dumppipeline
On-demand pipeline runs: trigger, request channel, and dump receipts. On-trigger pipeline runs.
encoder
Thread-local event encoding buffers and the Encodable trait. ThreadLocalBuffer is the entrypoint for almost all dial9 events
handle
Cloneable handle for recording events and controlling telemetry.
pipelinepipeline
Segment pipeline: processors, offline symbolization, and (with tokio) the pipeline builder and worker config.
recorder
The recorder builder. The recorder builder.
schema_extensions
Dial9 conventions layered on top of trace schema annotations. Dial9 conventions layered on top of free-form trace schema annotations.
source
Source trait: pluggable flush-thread data sources. Source trait for abstracting flush-thread data sources.
workerpipeline
Segment-processing worker: runs a SegmentProcessor pipeline over sealed segments. The segment-processing worker.

Structs§

CustomEventsConfig
Configuration for custom event callbacks.
CustomEventsContext
Context passed to a custom event callback.
FlushContext
Context passed to Source::flush for recording events into the trace.
SegmentWriter
A writer that rotates trace segments to bound resource usage and time. Generic over backend: use DiskBuffer (files) or MemoryBuffer.
ThreadLocalEncoder
Scoped encoder for writing events into the thread-local trace buffer.
ThreadTrackingGuard
Keeps the calling thread enrolled with the recorder’s per-thread sources.

Traits§

BufferMode
Marker trait for SegmentWriter’s backend mode. Sealed: only Disk and Memory implement it.
Encodable
Trait for types that can be encoded into a dial9 trace.
Source
A data source drained by the flush thread each cycle.

Functions§

clear_tl_handle
Clear the current thread’s Dial9Handle, installed by set_tl_handle.
clock_monotonic_ns
Read monotonic time in nanoseconds for trace timestamps.
current_handle
Return the Dial9Handle for the current thread, falling back to the process-global one. Equivalent to Dial9Handle::current.
current_tidAndroid or Linux
OS thread ID (tid) of the calling thread.
set_tl_handle
Install handle as the current thread’s Dial9Handle.