TraceEngine
TraceEngine owns mounted trace-view state below React. Hosts sync durable inputs into it, dispatch
semantic interactions into it, and subscribe when selected refs or serialized expanded process ids
need to be persisted.
import {TraceEngine} from '@deck.gl-community/trace-layers/trace';
Main operations
new TraceEngine(inputs): mount one engine around primary and optional secondary graphssync(inputs): replace durable host inputs without remounting the viewerdispatch(action): apply semantic selection and collapse interactionssubscribe(listener): receiveTraceEngineUpdatenotificationsgetSnapshot(): read the immutable renderer snapshot consumed byDeckTraceGraphgetPreparedScene(): read prepared foreground and overview scenes for low-level compositiongetDiagnostics(...): read cheap engine diagnostics and optional retained-size estimates
Host boundary
Keep durable host state small: TraceGraph, settings, paths, selected SpanRefs, color scheme,
and serialized expanded process ids. Let the mounted engine own transient selected dependency refs,
collapse runtime state, prepared layouts, and prepared scenes.
See DeckTraceGraph and Rendering traces.