Skip to content

Commit

Permalink
Log panics (flyteorg#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
EngHabu authored Apr 14, 2020
1 parent 06fc60c commit d654cfb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flytepropeller/pkg/controller/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (p *Propeller) Handle(ctx context.Context, namespace, name string) error {
if r := recover(); r != nil {
stack := debug.Stack()
err = fmt.Errorf("panic when aborting workflow, Stack: [%s]", string(stack))
logger.Errorf(ctx, err.Error())
p.metrics.PanicObserved.Inc(ctx)
}
}()
Expand Down Expand Up @@ -143,6 +144,7 @@ func (p *Propeller) Handle(ctx context.Context, namespace, name string) error {
if r := recover(); r != nil {
stack := debug.Stack()
err = fmt.Errorf("panic when reconciling workflow, Stack: [%s]", string(stack))
logger.Errorf(ctx, err.Error())
p.metrics.PanicObserved.Inc(ctx)
}
}()
Expand Down

0 comments on commit d654cfb

Please sign in to comment.