From a2a6044cf707bd22140797a5026f58d5052732ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=99=93=E6=95=8F?= Date: Thu, 12 Nov 2015 16:52:30 +0800 Subject: [PATCH] measurement name should have prefix before ShouldPass check --- accumulator.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accumulator.go b/accumulator.go index 79f0c51b1..78bf38dde 100644 --- a/accumulator.go +++ b/accumulator.go @@ -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())