Skip to content

Commit

Permalink
measurement name should have prefix before ShouldPass check
Browse files Browse the repository at this point in the history
  • Loading branch information
mxlxm authored and sparrc committed Nov 12, 2015
1 parent 3012928 commit e619845
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions accumulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ func (ac *accumulator) AddFields(
timestamp = time.Now()
}

if ac.prefix != "" {
measurement = ac.prefix + measurement
}

if ac.plugin != nil {
if !ac.plugin.ShouldPass(measurement, tags) {
return
Expand All @@ -104,10 +108,6 @@ func (ac *accumulator) AddFields(
}
}

if ac.prefix != "" {
measurement = ac.prefix + measurement
}

pt, err := client.NewPoint(measurement, tags, fields, timestamp)
if err != nil {
log.Printf("Error adding point [%s]: %s\n", measurement, err.Error())
Expand Down

0 comments on commit e619845

Please sign in to comment.