diff options
author | Alan Pearce | 2024-05-15 21:09:02 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-15 21:09:02 +0200 |
commit | fa97ca832d6dc301dabb5d9c76730630f99534e0 (patch) | |
tree | e34b587ba42c78df184f136198fd0093d916131e /internal | |
parent | d65d80e1133eebf11cc1adb3438a1cc53635185f (diff) | |
download | searchix-fa97ca832d6dc301dabb5d9c76730630f99534e0.tar.lz searchix-fa97ca832d6dc301dabb5d9c76730630f99534e0.tar.zst searchix-fa97ca832d6dc301dabb5d9c76730630f99534e0.zip |
feat: monitor import jobs via sentry
Diffstat (limited to 'internal')
-rw-r--r-- | internal/server/mux.go | 13 |
1 files changed, 1 insertions, 12 deletions
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) |