Skip to content

Commit 28b44e5

Browse files
author
Elie
committed
Capture panic in // runner and fwd to sentry
1 parent c564ba0 commit 28b44e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/parallel_runner.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"sync"
77

8+
"github.com/getsentry/sentry-go"
89
"github.com/sirupsen/logrus"
910

1011
"go.uber.org/atomic"
@@ -89,6 +90,7 @@ func (p *ParallelRunner) Run(runnable func() (interface{}, error)) {
8990
// Some failed call to grpc plugin like getSchema trigger a panic
9091
defer func() {
9192
if r := recover(); r != nil {
93+
sentry.CurrentHub().Recover(r)
9294
p.Stop(fmt.Errorf("A runner routine paniced: %s", r))
9395
}
9496
}()

0 commit comments

Comments
 (0)