feat(metrics): add http metrics

This commit is contained in:
TheFox0x7
2025-01-23 20:00:33 +01:00
parent 1dad933ec5
commit 3e06c39d2f
2 changed files with 51 additions and 13 deletions
+5
View File
@@ -11,10 +11,15 @@ import (
"code.gitea.io/gitea/modules/setting"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
)
const namespace = "gitea_"
func init() {
model.NameValidationScheme = model.UTF8Validation
}
// Collector implements the prometheus.Collector interface and
// exposes gitea metrics for prometheus
type Collector struct {