Stats errors in Sentry
Unittests / unittests (push) Successful in 9s Details
Unittests / deploy-dev (push) Successful in 52s Details

This commit is contained in:
Adam Štrauch 2024-01-26 21:43:45 +01:00
parent 7a170e56d6
commit a3d0ee92ce
Signed by: cx
GPG Key ID: 7262DAFE292BCE20
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package glue
import (
"log"
"github.com/getsentry/sentry-go"
"github.com/jinzhu/gorm"
"github.com/rosti-cz/node-api/apps"
docker "github.com/rosti-cz/node-api/containers"
@ -102,6 +103,7 @@ func (s *StatsProcessor) GatherStats() error {
for _, app := range appList {
err := s.UpdateUsage(app.Name)
if err != nil {
sentry.CaptureException(err)
log.Println("STATS ERROR:", err.Error())
}
}
@ -120,6 +122,7 @@ func (s *StatsProcessor) GatherStates() error {
for _, app := range appList {
err := s.UpdateState(app.Name)
if err != nil {
sentry.CaptureException(err)
log.Println("STATE ERROR:", err.Error())
}
}