/**
 * Telemetry Metrics Service domain port.
 *
 * Abstracts Prometheus metrics collection for telemetry events.
 */

export const TELEMETRY_METRICS_SERVICE = Symbol('ITelemetryMetricsService');

export interface ITelemetryMetricsService {
  /** Increment event counter by event name */
  incEventsTotal(eventName: string): void;

  /** Increment heartbeat counter by app version */
  incHeartbeatTotal(appVersion: string): void;

  /** Set current online user gauge */
  setOnlineUsers(count: number): void;

  /** Set DAU gauge */
  setDau(date: string, count: number): void;

  /** Start a batch duration timer. Returns a function to call when done. */
  startBatchTimer(): () => void;

  /** Get serialized metrics for Prometheus scraping */
  getMetrics(): Promise<string>;

  /** Get Prometheus content type */
  getContentType(): string;
}
