Skip to content

Commit

Permalink
ignore badrequest new relic (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioesposito authored May 18, 2018
1 parent dfcfa51 commit 5fb7cd3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ranger_metrics/newrelic.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ func NewRelicLabels(middleware ranger_http.MiddlewareInterface, labels map[strin
config := newrelic.NewConfig(nr.appName, nr.license)
config.Labels = labels

config.ErrorCollector.IgnoreStatusCodes = []int{
http.StatusBadRequest, // 400
}

app, err := newrelic.NewApplication(config)
if err != nil {
nr.logger.Panic("NewRelic cannot create app with labels", ranger_logger.LoggerData{"error": err.Error()})
Expand Down

0 comments on commit 5fb7cd3

Please sign in to comment.