mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 20:38:00 +00:00
7573e0ea8f
# Which Problems Are Solved The metric `http_server_return_code_counter` doesn't record calls to the gRPC gateway. # How the Problems Are Solved The DefaultMetricsHandler that is used for the gPRC gateway doesn't record `http_server_return_code_counter`. Instead of the DefaultMetricsHandler, a custom metrics handler which includes `http_server_return_code_counter` is created for the gRPC gateway # Additional Changes The DefaultMetricsHandler function is removed, as it is no longer used. # Additional Context Reported by a customer --------- Co-authored-by: Silvan <silvan.reusser@gmail.com>
14 lines
347 B
Go
14 lines
347 B
Go
package middleware
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/zitadel/zitadel/internal/telemetry/metrics"
|
|
)
|
|
|
|
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...)
|
|
}
|
|
}
|