Expand description
Structured diagnostics and telemetry for the Fission rendering pipeline.
Provides a global, thread-safe diagnostics system that emits structured JSON
events covering every stage of the frame lifecycle. Configure via environment
variables (init_from_env()) or programmatically (init()).
§Quick start
ⓘ
use fission_diagnostics::prelude::*;
init_from_env();
begin_frame(None);
emit(DiagCategory::Layout, DiagLevel::Debug, DiagEventKind::LayoutSummary {
nodes: 100, dirty_count: 2, full_rebuild: false, duration_ns: 500_000,
});
end_frame(FrameStats::default());Modules§
- prelude
- Convenience re-exports for common diagnostic operations.
Structs§
- Diag
Event - The top-level diagnostic event envelope.
- Diagnostics
Config - Configuration for the diagnostics system.
- Frame
Stats - Summary statistics for a completed frame, attached to
DiagEventKind::FrameEnd. - Snapshot
Blob - A serialized snapshot blob containing JSON data.
Enums§
- Diag
Category - Pipeline subsystem that a diagnostic event belongs to.
- Diag
Event Kind - The concrete payload for a diagnostic event.
- Diag
Level - Severity level for diagnostic events.
- Diag
Sink - Output destination for diagnostic events.
- Snapshot
Kind - The type of snapshot that a
SnapshotProvidercan produce.
Traits§
- Snapshot
Provider - Trait for components that can produce a JSON snapshot of their internal state.
Functions§
- begin_
frame - Mark the start of a new frame. Increments the frame counter and emits a
DiagEventKind::FrameStartevent. - emit
- Emit a diagnostic event if the given category and level pass the current filter.
- end_
frame - Mark the end of the current frame, attaching the given
FrameStats. - init
- Initialize the diagnostics system with the given configuration.
- init_
from_ env - Initialize the diagnostics system from environment variables.