Use Telemetry to report statistics from an IStats object at a regular interval to a WebSocket or HTTP server.

Example

// Streamer statistics reporting to a websocket SSL server with a frequency of 1 second
const telemetry = new Telemetry('wss://address/metrics');
telemetry.report(new StreamerStats(streamer), 1);

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

Properties

_fetch?: AbortController
_reporting: number
_url: string
log: ILog

Start a log

Param

Returns

a Log object with the levels of log to call

Accessors

Methods

  • Starts reporting metrics from an IStats instance to the URL end-point

    Parameters

    • stats: IStats

      IStats implementation

    • frequency: number

      report interval, if is equals to 0 it reports only one time the stats

    Returns void

Generated using TypeDoc