misc: added monitoring for user auth

This commit is contained in:
Sheen Capadngan
2025-10-30 00:11:38 +08:00
parent 09b9bfaede
commit e40031aeb5
9 changed files with 261 additions and 97 deletions
+22
View File
@@ -0,0 +1,22 @@
import opentelemetry from "@opentelemetry/api";
const infisicalMeter = opentelemetry.metrics.getMeter("Infisical");
export enum AuthAttemptAuthMethod {
EMAIL = "email",
SAML = "saml",
OIDC = "oidc",
GOOGLE = "google",
GITHUB = "github",
GITLAB = "gitlab"
}
export enum AuthAttemptAuthResult {
SUCCESS = "success",
FAILURE = "failure"
}
export const authAttemptCounter = infisicalMeter.createCounter("infisical.auth.attempt.count", {
description: "Authentication attempts (both successful and failed)",
unit: "{attempt}"
});