Scoria.Observe.ReviewerBroadcast (scoria v0.1.3)

Copy Markdown View Source

Tenant-scoped PubSub fan-out for reviewer dashboard trace events.

Use this module when runtime telemetry needs to reach /scoria reviewer pages without crossing tenant boundaries. It publishes trace headers, trace spans, streaming trace deltas, HITL approval requests, and approval decisions to scoria:runs:{tenant_id}.

Tracks seen trace_id values per BEAM node in ETS (:scoria_observe_reviewer_broadcast_trace_seen) so {:trace_opened, _} is emitted only on the first span stop for a trace on this node. Missing tenant_id drops broadcast fail-closed with a debug log; there is no global topic fallback.

See guides/reviewer-verification.md for reviewer trace verification and guides/ownership-boundary.md for the host-owned tenant-scope boundary.

Summary

Functions

approval_decided(tenant_id, approval_id, status)

broadcast(tenant_id, message)

hitl_request(tenant_id, projection_map)

reset_trace_seen!()

span_delta(arg1)

span_stopped(metadata)

tenant_topic(tenant_id)