Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/public-api-server/pkg/oidc/metrics.go
2500 views
1
// Copyright (c) 2023 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
package oidc
6
7
import (
8
"github.com/prometheus/client_golang/prometheus"
9
)
10
11
var (
12
loginCompletedTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
13
Namespace: "gitpod",
14
Name: "login_completed_total",
15
Help: "Total number of logins completed into gitpod, by status",
16
}, []string{"status", "type"})
17
)
18
19
func RegisterMetrics(registry *prometheus.Registry) {
20
registry.MustRegister(loginCompletedTotal)
21
}
22
23
func reportLoginCompleted(status string, typez string) {
24
loginCompletedTotal.WithLabelValues(status, typez).Inc()
25
}
26
27