@qualithm/kafka-client - v0.1.6
    Preparing search index...

    Class TelemetryReporter

    Client telemetry reporter (KIP-714).

    Discovers the broker's telemetry subscription via GetTelemetrySubscriptions, then periodically pushes collected metrics via PushTelemetry. On shutdown, sends a final push with terminating: true.

    const reporter = new TelemetryReporter(pool, {
    collector: (sub) => mySerialiseMetrics(sub),
    })
    await reporter.start()
    // ... later ...
    await reporter.stop()
    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • get isRunning(): boolean

      Whether the reporter is actively pushing telemetry.

      Returns boolean

    Methods

    • Start the telemetry reporter.

      Fetches the broker's telemetry subscription and begins periodic pushes. If the broker does not support telemetry, the reporter silently remains inactive.

      Returns Promise<void>

    • Stop the telemetry reporter.

      Sends a final terminating push and stops the interval timer.

      Returns Promise<void>