feat: adjust logging; implement pem crl endpoint; add crl entries metric; lock on UseCrl

This commit is contained in:
Florian Bauer
2025-01-21 10:05:20 +01:00
parent 8844427927
commit 56319a79c9
3 changed files with 23 additions and 7 deletions

View File

@@ -16,19 +16,26 @@ var (
}, []string{labelPath})
responseStatus = prometheus.NewCounterVec(prometheus.CounterOpts{
Name: "response_status",
Name: "http_response_status",
Help: "Status of HTTP response",
}, []string{labelPath, labelStatus})
httpDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: "http_response_time_seconds",
Help: "Duration of HTTP requests.",
Buckets: prometheus.DefBuckets,
Buckets: prometheus.ExponentialBuckets(0.0001, 2, 10),
}, []string{labelPath})
CrlEntries = prometheus.NewGauge(prometheus.GaugeOpts{
Namespace: "ocspcrl",
Name: "crl_entries_total",
Help: "Number of entries in the CRL",
})
)
func init() {
prometheus.MustRegister(totalRequests)
prometheus.MustRegister(responseStatus)
prometheus.MustRegister(httpDuration)
prometheus.MustRegister(CrlEntries)
}