Organize backend into product executable and shared Go modules

This commit is contained in:
Stephan D committed 2026-09-12 14:14:08 +02:00
1 parent 981e84a4b4
commit f0720ec66b
382 files changed
+1944 -6989

No files matched your search

@@ -0,0 +1,35 @@
package sessionmetrics
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
type Operation string
const (
Validation Operation = "validation"
CurrentLogout Operation = "current_logout"
AllLogout Operation = "all_logout"
)
type Outcome string
const (
Active Outcome = "active"
Succeeded Outcome = "succeeded"
AlreadyInactive Outcome = "already_inactive"
MissingIdentity Outcome = "missing_identity"
StorageError Outcome = "storage_error"
)
var lifecycle = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "sendico",
Subsystem: "auth",
Name: "session_lifecycle_total",
Help: "Session validation and logout outcomes.",
}, []string{"operation", "outcome"})
func Observe(operation Operation, outcome Outcome) {
lifecycle.WithLabelValues(string(operation), string(outcome)).Inc()
}