measurement name should have prefix before ShouldPass check
This commit is contained in:
parent
3012928452
commit
e619845ffe
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue