mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 22:29:15 +00:00
misc: added monitoring for user auth
This commit is contained in:
@@ -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}"
|
||||
});
|
||||
Reference in New Issue
Block a user