mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-24 00:28:18 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
21 lines
608 B
Go
21 lines
608 B
Go
package middleware
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/zitadel/zitadel/internal/telemetry/metrics"
|
|
|
|
http_utils "github.com/zitadel/zitadel/internal/api/http"
|
|
)
|
|
|
|
func DefaultMetricsHandler(handler http.Handler) http.Handler {
|
|
metricTypes := []metrics.MetricType{metrics.MetricTypeTotalCount}
|
|
return MetricsHandler(metricTypes, http_utils.Probes...)(handler)
|
|
}
|
|
|
|
func MetricsHandler(metricTypes []metrics.MetricType, ignoredMethods ...string) func(http.Handler) http.Handler {
|
|
return func(handler http.Handler) http.Handler {
|
|
return metrics.NewMetricsHandler(handler, metricTypes, ignoredMethods...)
|
|
}
|
|
}
|