From fa97ca832d6dc301dabb5d9c76730630f99534e0 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 15 May 2024 21:09:02 +0200 Subject: feat: monitor import jobs via sentry --- internal/server/mux.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'internal/server/mux.go') diff --git a/internal/server/mux.go b/internal/server/mux.go index e15535f..f49767b 100644 --- a/internal/server/mux.go +++ b/internal/server/mux.go @@ -20,7 +20,6 @@ import ( "searchix/internal/options" "github.com/blevesearch/bleve/v2" - "github.com/getsentry/sentry-go" sentryhttp "github.com/getsentry/sentry-go/http" "github.com/osdevisnot/sorvor/pkg/livereload" "github.com/pkg/errors" @@ -83,20 +82,10 @@ func NewMux( index *search.ReadIndex, liveReload bool, ) (*http.ServeMux, error) { - err := sentry.Init(sentry.ClientOptions{ - EnableTracing: true, - TracesSampleRate: 1.0, - Dsn: cfg.Web.SentryDSN, - Environment: cfg.Web.Environment, - }) - if err != nil { - return nil, errors.WithMessage(err, "could not set up sentry") - } - defer sentry.Flush(2 * time.Second) + var err error sentryHandler := sentryhttp.New(sentryhttp.Options{ Repanic: true, }) - templates, err = loadTemplates() if err != nil { log.Panicf("could not load templates: %v", err) -- cgit 1.4.1