diff --git a/http/sentryhttp.go b/http/sentryhttp.go index 62549e5e..1bb8819d 100644 --- a/http/sentryhttp.go +++ b/http/sentryhttp.go @@ -8,6 +8,7 @@ import ( "time" "github.com/getsentry/sentry-go" + "github.com/getsentry/sentry-go/internal/httputils" "github.com/getsentry/sentry-go/internal/traceutils" ) @@ -107,7 +108,7 @@ func (h *Handler) handle(handler http.Handler) http.HandlerFunc { ) transaction.SetData("http.request.method", r.Method) - rw := sentry.NewWrapResponseWriter(w, r.ProtoMajor) + rw := httputils.NewWrapResponseWriter(w, r.ProtoMajor) defer func() { status := rw.Status() diff --git a/wrap_writer.go b/internal/httputils/wrap_writer.go similarity index 99% rename from wrap_writer.go rename to internal/httputils/wrap_writer.go index 01f5f45c..481353a1 100644 --- a/wrap_writer.go +++ b/internal/httputils/wrap_writer.go @@ -1,4 +1,4 @@ -package sentry +package httputils import ( "bufio" diff --git a/wrap_writer_test.go b/internal/httputils/wrap_writer_test.go similarity index 99% rename from wrap_writer_test.go rename to internal/httputils/wrap_writer_test.go index b4cdc9e0..2487cd3a 100644 --- a/wrap_writer_test.go +++ b/internal/httputils/wrap_writer_test.go @@ -1,4 +1,4 @@ -package sentry +package httputils import ( "bufio" diff --git a/negroni/sentrynegroni.go b/negroni/sentrynegroni.go index 6740ee6f..c1afef75 100644 --- a/negroni/sentrynegroni.go +++ b/negroni/sentrynegroni.go @@ -6,6 +6,7 @@ import ( "time" "github.com/getsentry/sentry-go" + "github.com/getsentry/sentry-go/internal/httputils" "github.com/getsentry/sentry-go/internal/traceutils" "github.com/urfave/negroni" ) @@ -69,7 +70,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.Ha ) transaction.SetData("http.request.method", r.Method) - rw := sentry.NewWrapResponseWriter(w, r.ProtoMajor) + rw := httputils.NewWrapResponseWriter(w, r.ProtoMajor) defer func() { status := rw.Status()