Setu-TS
    Preparing search index...

    Function createRealtimeObservationCollector

    • Creates the collector a WebSocket, SSE or realtime-backplane plugin attaches to its own component and registers as its realtime diagnostics source (M98l). With a null alias it is inert: it observes nothing, never reads the clock or the gauges, and answers a disabled snapshot.

      Parameters

      Returns IRealtimeObservationCollector

      The collector; register its source facade, never the collector

      When an enabled websocket or sse collector is given no gauge reader

      const collector = createRealtimeObservationCollector({
      kind: 'websocket',
      alias: compileRealtimeDiagnosticsAlias({ enabled: true, alias: 'chat' }),
      clock: () => ctx.runtime.hrtime(),
      gauges: () => ({ openConnections: service.connectionCount, groups: service.roomCount }),
      });

      0.8.0