feat: sentry integration
All checks were successful
arcad/emissary/pipeline/head This commit looks good
All checks were successful
arcad/emissary/pipeline/head This commit looks good
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
|
||||
"forge.cadoles.com/Cadoles/emissary/internal/agent"
|
||||
"forge.cadoles.com/Cadoles/emissary/internal/spec"
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/pkg/errors"
|
||||
"gitlab.com/wpetit/goweb/logger"
|
||||
)
|
||||
@ -145,7 +146,9 @@ func (c *Controller) writeState(ctx context.Context, state *agent.State) error {
|
||||
return
|
||||
}
|
||||
|
||||
logger.Error(ctx, "could not remove temporary file", logger.E(errors.WithStack(err)))
|
||||
err = errors.WithStack(err)
|
||||
logger.Error(ctx, "could not remove temporary file", logger.E(err))
|
||||
sentry.CaptureException(err)
|
||||
}
|
||||
}()
|
||||
|
||||
@ -155,7 +158,9 @@ func (c *Controller) writeState(ctx context.Context, state *agent.State) error {
|
||||
return
|
||||
}
|
||||
|
||||
logger.Error(ctx, "could not close temporary file", logger.E(errors.WithStack(err)))
|
||||
err = errors.WithStack(err)
|
||||
logger.Error(ctx, "could not close temporary file", logger.E(err))
|
||||
sentry.CaptureException(err)
|
||||
}
|
||||
}()
|
||||
|
||||
|
Reference in New Issue
Block a user