Skip to content

Commit

Permalink
report error to sentry in stream interceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
deep110 committed Aug 3, 2021
1 parent 0805d50 commit c999984
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion surveillance/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ func (wrapper *Sentry) StreamServerInterceptor() grpc.StreamServerInterceptor {

wrapped := sentryWrapper.WrapServerStream(stream)
wrapped.WrappedContext = ctx
return handler(srv, wrapped)
err := handler(srv, wrapped)

if opts.ReportOn(err) {
hub.CaptureException(err)
}

return err
}
}

0 comments on commit c999984

Please sign in to comment.