import { Counter, Registry, Summary } from "prom-client";

export enum OnboardMetrics {
  BUZZER_CONFLICT = "BuzzerConflict",
  NAME_CONFLICT = "NameConflict",
  TRANSACTION_CONFLICT = "TransactionConflict",
}

export const registerMetrics = (metricsRegistry: Registry) => {
  metricsRegistry.registerMetric(new Counter({
    name: OnboardMetrics.BUZZER_CONFLICT,
    help: "Onboarding was attepted with a buzzer number that is already registered",
    labelNames: ['buzzer'],
  }));
  
  metricsRegistry.registerMetric(new Counter({
    name: OnboardMetrics.NAME_CONFLICT,
    help: "Onboarding was attepted with a name that is already registered",
    labelNames: ['name'],
  }));
  
  metricsRegistry.registerMetric(new Counter({
    name: OnboardMetrics.TRANSACTION_CONFLICT,
    help: "There was a conflict in the transactions after discord authorization. This likely means two onboardings conflicted",
  }));
}

