Copy metrics for each configured output

This is for better thread-safety when running with multiple outputs,
which can cause very odd panics at very high loads

primarily this is to address #1432

closes #1432
This commit is contained in:
Cameron Sparr
2016-07-13 08:14:48 -06:00
parent 821d3fafa6
commit bfdd665435
6 changed files with 42 additions and 10 deletions

View File

@@ -20,7 +20,7 @@ type GraphiteSerializer struct {
Template string
}
func (s GraphiteSerializer) Serialize(metric telegraf.Metric) ([]string, error) {
func (s *GraphiteSerializer) Serialize(metric telegraf.Metric) ([]string, error) {
out := []string{}
// Convert UnixNano to Unix timestamps