diff --git a/gin/sentrygin.go b/gin/sentrygin.go index f50b8b79..d404bbcc 100644 --- a/gin/sentrygin.go +++ b/gin/sentrygin.go @@ -63,7 +63,7 @@ func (h *handler) handle(ctx *gin.Context) { r := ctx.Request - transactionName := ctx.Request.URL.Path + transactionName := r.URL.Path transactionSource := sentry.SourceURL if fp := ctx.FullPath(); fp != "" { diff --git a/hub_test.go b/hub_test.go index 27930732..00f1e513 100644 --- a/hub_test.go +++ b/hub_test.go @@ -440,7 +440,7 @@ func TestGetTraceparent(t *testing.T) { for name, tt := range tests { t.Run(name, func(t *testing.T) { result := tt.hub.GetTraceparent() - assertEqual(t, tt.expected, result) + assertEqual(t, result, tt.expected) }) } } @@ -479,7 +479,7 @@ func TestGetBaggageHeader(t *testing.T) { result := tt.hub.GetBaggage() res := strings.Split(result, ",") sortSlice(res) - assertEqual(t, tt.expected, strings.Join(res, ",")) + assertEqual(t, strings.Join(res, ","), tt.expected) }) } }