Component evidence

NoopTelemetryClient (telemetry/noop.ts)

postman-mcp-server · src/telemetry/noop.ts · typescript · Apache-2.0
analytics

Provides a no-operation implementation of a telemetry client for disabling tracking without changing the calling code's interface.

Source preview public preview
// Source: https://github.com/postmanlabs/postman-mcp-server | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import type { ToolCallParams } from './client.js';
import type { TelemetrySession } from './session.js';

/**
 * No-op telemetry client with zero overhead.
 * Used when telemetry is disabled.
 */
export class NoopTelemetryClient {
  sessionInit(
    _session: TelemetrySession,
    _params: { clientCapabilities: string[]; serverCapabilities: string[] },
  ): void {}
  toolCall(_session: TelemetrySession, _params: ToolCallParams): void {}
  async flush(): Promise<void> {}
  async shutdown(): Promise<void> {}
}