Skip to content

Type Alias: TelemetryEvent

ts
type TelemetryEvent = 
  | DebugEvent
  | DlpRedactEvent
  | PresenterSliceEvent
  | PresenterRulesEvent
  | SandboxExecEvent
  | FsmTransitionEvent
  | TopologyEvent
  | HeartbeatEvent;

Defined in: packages/core/src/observability/TelemetryEvent.ts:183

All possible telemetry events that flow through the Shadow Socket.

This is a superset of DebugEvent — the core pipeline events are included alongside the domain-specific telemetry.

Use switch (event.type) for exhaustive handling:

typescript
function handle(event: TelemetryEvent) {
    switch (event.type) {
        case 'route':           // DebugEvent
        case 'validate':        // DebugEvent
        case 'execute':         // DebugEvent
        case 'error':           // DebugEvent
        case 'middleware':       // DebugEvent
        case 'governance':      // DebugEvent
        case 'dlp.redact':      // DlpRedactEvent
        case 'presenter.slice': // PresenterSliceEvent
        case 'presenter.rules': // PresenterRulesEvent
        case 'sandbox.exec':    // SandboxExecEvent
        case 'fsm.transition':  // FsmTransitionEvent
        case 'topology':        // TopologyEvent
        case 'heartbeat':       // HeartbeatEvent
    }
}