Path: blob/main/components/public-api-server/pkg/oidc/metrics.go
2500 views
// Copyright (c) 2023 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34package oidc56import (7"github.com/prometheus/client_golang/prometheus"8)910var (11loginCompletedTotal = prometheus.NewCounterVec(prometheus.CounterOpts{12Namespace: "gitpod",13Name: "login_completed_total",14Help: "Total number of logins completed into gitpod, by status",15}, []string{"status", "type"})16)1718func RegisterMetrics(registry *prometheus.Registry) {19registry.MustRegister(loginCompletedTotal)20}2122func reportLoginCompleted(status string, typez string) {23loginCompletedTotal.WithLabelValues(status, typez).Inc()24}252627