zitadel/internal/api/http/middleware/trace_interceptor.go

19 lines
461 B
Go
Raw Normal View History

2020-03-24 13:15:01 +00:00
package middleware
import (
"net/http"
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 {
return tracing.TraceHandler(handler, http_utils.Probes...)
2020-03-24 13:15:01 +00:00
}
func TraceHandler(ignoredMethods ...string) func(http.Handler) http.Handler {
return func(handler http.Handler) http.Handler {
return tracing.TraceHandler(handler, ignoredMethods...)
}
}