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.
- dump
pipeline - On-demand pipeline runs: trigger, request channel, and dump receipts. On-trigger pipeline runs.
- encoder
- Thread-local event encoding buffers and the
Encodabletrait.ThreadLocalBufferis the entrypoint for almost all dial9 events - handle
- Cloneable handle for recording events and controlling telemetry.
- pipeline
pipeline - 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
Sourcetrait: pluggable flush-thread data sources. Source trait for abstracting flush-thread data sources.- worker
pipeline - Segment-processing worker: runs a
SegmentProcessorpipeline over sealed segments. The segment-processing worker.
Structs§
- Custom
Events Config - Configuration for custom event callbacks.
- Custom
Events Context - Context passed to a custom event callback.
- Flush
Context - Context passed to
Source::flushfor recording events into the trace. - Segment
Writer - A writer that rotates trace segments to bound resource usage and time.
Generic over backend: use
DiskBuffer(files) orMemoryBuffer. - Thread
Local Encoder - Scoped encoder for writing events into the thread-local trace buffer.
- Thread
Tracking Guard - Keeps the calling thread enrolled with the recorder’s per-thread sources.
Traits§
- Buffer
Mode - Marker trait for
SegmentWriter’s backend mode. Sealed: onlyDiskandMemoryimplement 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 byset_tl_handle. - clock_
monotonic_ ns - Read monotonic time in nanoseconds for trace timestamps.
- current_
handle - Return the
Dial9Handlefor the current thread, falling back to the process-global one. Equivalent toDial9Handle::current. - current_
tid Android or Linux - OS thread ID (tid) of the calling thread.
- set_
tl_ handle - Install
handleas the current thread’sDial9Handle.