2020-03-24 13:15:01 +00:00
|
|
|
package middleware
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
2020-07-08 11:56:37 +00:00
|
|
|
http_utils "github.com/caos/zitadel/internal/api/http"
|
2020-03-24 13:15:01 +00:00
|
|
|
"github.com/caos/zitadel/internal/tracing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func DefaultTraceHandler(handler http.Handler) http.Handler {
|
2020-07-08 11:56:37 +00:00
|
|
|
return tracing.TraceHandler(handler, http_utils.Probes...)
|
2020-03-24 13:15:01 +00:00
|
|
|
}
|
2020-10-21 08:18:34 +00:00
|
|
|
|
|
|
|
func TraceHandler(ignoredMethods ...string) func(http.Handler) http.Handler {
|
|
|
|
return func(handler http.Handler) http.Handler {
|
|
|
|
return tracing.TraceHandler(handler, ignoredMethods...)
|
|
|
|
}
|
|
|
|
}
|