Add pivot and unpivot processors (#5991)

This commit is contained in:
Daniel Nelson
2019-06-14 15:26:56 -07:00
committed by GitHub
parent 7f04511c30
commit 1ea7863b9b
8 changed files with 386 additions and 2 deletions

View File

@@ -240,11 +240,11 @@ func (m *metric) Copy() telegraf.Metric {
}
for i, tag := range m.tags {
m2.tags[i] = tag
m2.tags[i] = &telegraf.Tag{Key: tag.Key, Value: tag.Value}
}
for i, field := range m.fields {
m2.fields[i] = field
m2.fields[i] = &telegraf.Field{Key: field.Key, Value: field.Value}
}
return m2
}