Skip to content

Commit

Permalink
logging dogstatsd reporters' errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriabrito committed Nov 7, 2017
1 parent 7b97f0f commit 5641259
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm/charts/maestro/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: maestro
home: https://github.com/topfreegames/maestro
description: Maestro api and worker
version: 4.4.5
version: 4.4.6
maintainers:
- name: TFGCo
email: backend@tfgco.com
2 changes: 1 addition & 1 deletion metadata/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package metadata

//Version of Maestro
var Version = "4.4.5"
var Version = "4.4.6"

//KubeVersion is the desired Kubernetes version
var KubeVersion = "v1.7.5"
9 changes: 8 additions & 1 deletion reporters/dogstatsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
// DogStatsD reports metrics to a dogstatsd.Client
type DogStatsD struct {
client dogstatsd.Client
logger *logrus.Logger
region string
}

Expand All @@ -34,7 +35,13 @@ func (d *DogStatsD) Report(event string, opts map[string]string) error {
handler := handlerI.(func(dogstatsd.Client, string, map[string]string) error)

opts[constants.TagRegion] = d.region
return handler(d.client, event, opts)

err := handler(d.client, event, opts)
if err != nil {
d.logger.Error(err)
}

return err
}

// MakeDogStatsD adds a DogStatsD struct to the Reporters' singleton
Expand Down

0 comments on commit 5641259

Please sign in to comment.