bouncer/internal/proxy/director/layer/authn/oidc/metrics.go
William Petit de70fa89f7
Some checks are pending
Cadoles/bouncer/pipeline/pr-develop Build started...
feat: new openid connect authentication layer
2024-05-17 11:53:19 +02:00

40 lines
1.0 KiB
Go

package oidc
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
const (
metricNamespace = "bouncer_layer_authn_oidc"
metricLabelProxy = "proxy"
metricLabelLayer = "layer"
)
var (
metricLoginRequestsTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "login_requests_total",
Help: "Bouncer's authn-oidc layer total login requests",
Namespace: metricNamespace,
},
[]string{metricLabelProxy, metricLabelLayer},
)
metricLoginSuccessesTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "login_successes_total",
Help: "Bouncer's authn-oidc layer total login successes",
Namespace: metricNamespace,
},
[]string{metricLabelProxy, metricLabelLayer},
)
metricLogoutsTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "logout_total",
Help: "Bouncer's authn-oidc layer total logouts",
Namespace: metricNamespace,
},
[]string{metricLabelProxy, metricLabelLayer},
)
)