From 9311a060b6e1d6f2c0bb783789bebcc88b873764 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Mon, 8 Apr 2024 15:01:18 +0700 Subject: [PATCH] chore(echo): rename GetTransaction to GetSpan (#812) Co-authored-by: Michi Hoffmann --- echo/sentryecho_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/echo/sentryecho_test.go b/echo/sentryecho_test.go index 402c1ca44..54e3e40cb 100644 --- a/echo/sentryecho_test.go +++ b/echo/sentryecho_test.go @@ -413,7 +413,7 @@ func TestIntegration(t *testing.T) { } } -func TestGetTransactionFromContext(t *testing.T) { +func TestGetSpanFromContext(t *testing.T) { err := sentry.Init(sentry.ClientOptions{ EnableTracing: true, TracesSampleRate: 1.0, @@ -423,17 +423,17 @@ func TestGetTransactionFromContext(t *testing.T) { } router := echo.New() - router.GET("/no-transaction", func(c echo.Context) error { - transaction := sentryecho.GetSpanFromContext(c) - if transaction != nil { - t.Error("expecting transaction to be nil") + router.GET("/no-span", func(c echo.Context) error { + span := sentryecho.GetSpanFromContext(c) + if span != nil { + t.Error("expecting span to be nil") } return c.NoContent(http.StatusOK) }) - router.GET("/with-transaction", func(c echo.Context) error { - transaction := sentryecho.GetSpanFromContext(c) - if transaction == nil { - t.Error("expecting transaction to be not nil") + router.GET("/with-span", func(c echo.Context) error { + span := sentryecho.GetSpanFromContext(c) + if span == nil { + t.Error("expecting span to not be nil") } return c.NoContent(http.StatusOK) }, sentryecho.New(sentryecho.Options{})) @@ -447,10 +447,10 @@ func TestGetTransactionFromContext(t *testing.T) { RequestPath string }{ { - RequestPath: "/no-transaction", + RequestPath: "/no-span", }, { - RequestPath: "/with-transaction", + RequestPath: "/with-span", }, } c.Timeout = time.Second