measurement name should have prefix before ShouldPass check

This commit is contained in:
鲁晓敏 2015-11-12 16:52:30 +08:00
parent 352ccde52b
commit a2a6044cf7
1 changed files with 4 additions and 4 deletions

View File

@ -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
@ -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())