Skip to main content
zerotal

Documentation


Documentation / @zerotal/telemetry / installEventBridge

Function: installEventBridge()

installEventBridge(tracer): () => void

Defined in: telemetry/src/bridge.ts:26

Bridge the core lifecycle events (AppBooted, RequestHandled, RequestFailed) into the trace pipeline as completed spans. Telemetry subscribes to core; core never depends on telemetry.

Feature packages forward their own signal (DB queries, jobs, scheduled tasks) through their own telemetry bridge, which resolves this tracer from the container when telemetry is installed. Telemetry therefore knows nothing about feature packages, and adding one requires no change here.

Returns a function that removes every subscription (call in onStopping()).

Parameters

tracer

Tracer

Returns

() => void