Discriminator for the union payload types on CombinedRecorder's shared
methods (onError, onPause, onResume). Returns true if the event
was emitted from the control-flow channel (FlowRecorder).
How it discriminates
Explicit channel field first (backlog B3): every engine-dispatched
shared-method event is stamped channel: 'flow' (control-flow) or
channel: 'scope' (data-flow) at construction. This is the positive,
schema-robust signal — it survives wrappers that add/strip fields.
Legacy fallback for unstamped events (consumer-fabricated tests,
persisted traces from <9.2): scope-channel events extend
RecorderContext, which carries pipelineId; flow-channel events do
not. The flow variant is detected by the ABSENCE of pipelineId —
schema-stable as long as scope events continue to extend
RecorderContext, but fragile against field-stripping wrappers, which
is why the explicit discriminant now exists.
Discriminator for the union payload types on
CombinedRecorder's shared methods (onError,onPause,onResume). Returnstrueif the event was emitted from the control-flow channel (FlowRecorder).How it discriminates
channelfield first (backlog B3): every engine-dispatched shared-method event is stampedchannel: 'flow'(control-flow) orchannel: 'scope'(data-flow) at construction. This is the positive, schema-robust signal — it survives wrappers that add/strip fields.RecorderContext, which carriespipelineId; flow-channel events do not. The flow variant is detected by the ABSENCE ofpipelineId— schema-stable as long as scope events continue to extendRecorderContext, but fragile against field-stripping wrappers, which is why the explicit discriminant now exists.