mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-03 01:18:51 +00:00
fix: add sentry in ui, http and projection handlers (#1977)
* fix: add sentry in ui, http and projection handlers * fix test
This commit is contained in:
@@ -2,6 +2,9 @@ package spooler
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/getsentry/sentry-go"
|
||||
|
||||
"github.com/caos/zitadel/internal/eventstore/v1"
|
||||
"strconv"
|
||||
"sync"
|
||||
@@ -64,7 +67,14 @@ func requeueTask(task *spooledHandler, queue chan<- *spooledHandler) {
|
||||
|
||||
func (s *spooledHandler) load(workerID string) {
|
||||
errs := make(chan error)
|
||||
defer close(errs)
|
||||
defer func() {
|
||||
close(errs)
|
||||
err := recover()
|
||||
|
||||
if err != nil {
|
||||
sentry.CurrentHub().Recover(err)
|
||||
}
|
||||
}()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
go s.awaitError(cancel, errs, workerID)
|
||||
hasLocked := s.lock(ctx, errs, workerID)
|
||||
|
||||
@@ -42,6 +42,10 @@ func (h *testHandler) ViewModel() string {
|
||||
return h.viewModel
|
||||
}
|
||||
|
||||
func (h *testHandler) Subscription() *v1.Subscription {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *testHandler) EventQuery() (*models.SearchQuery, error) {
|
||||
if h.queryError != nil {
|
||||
return nil, h.queryError
|
||||
|
||||
Reference in New Issue
Block a user