Skip to main content

Crate fission_diagnostics

Crate fission_diagnostics 

Source
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§

DiagEvent
The top-level diagnostic event envelope.
DiagnosticsConfig
Configuration for the diagnostics system.
FrameStats
Summary statistics for a completed frame, attached to DiagEventKind::FrameEnd.
SnapshotBlob
A serialized snapshot blob containing JSON data.

Enums§

DiagCategory
Pipeline subsystem that a diagnostic event belongs to.
DiagEventKind
The concrete payload for a diagnostic event.
DiagLevel
Severity level for diagnostic events.
DiagSink
Output destination for diagnostic events.
SnapshotKind
The type of snapshot that a SnapshotProvider can produce.

Traits§

SnapshotProvider
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::FrameStart event.
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.