Skip to content

Commit

Permalink
Handle collector Start error (#2647)
Browse files Browse the repository at this point in the history
Signed-off-by: albertteoh <albert.teoh@logz.io>
  • Loading branch information
albertteoh authored Nov 25, 2020
1 parent dddd3db commit d1fffab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/collector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ func main() {
HealthCheck: svc.HC(),
})
collectorOpts := new(app.CollectorOptions).InitFromViper(v)
c.Start(collectorOpts)
if err := c.Start(collectorOpts); err != nil {
logger.Fatal("Failed to start collector", zap.Error(err))
}

svc.RunAndThen(func() {
if err := c.Close(); err != nil {
Expand Down

0 comments on commit d1fffab

Please sign in to comment.