Add docker input server version (#4035)
This commit is contained in:
@@ -65,8 +65,15 @@ func (a *Accumulator) AddFields(
|
||||
if a.Discard {
|
||||
return
|
||||
}
|
||||
if tags == nil {
|
||||
tags = map[string]string{}
|
||||
|
||||
tagsCopy := map[string]string{}
|
||||
for k, v := range tags {
|
||||
tagsCopy[k] = v
|
||||
}
|
||||
|
||||
fieldsCopy := map[string]interface{}{}
|
||||
for k, v := range fields {
|
||||
fieldsCopy[k] = v
|
||||
}
|
||||
|
||||
if len(fields) == 0 {
|
||||
@@ -91,7 +98,7 @@ func (a *Accumulator) AddFields(
|
||||
p := &Metric{
|
||||
Measurement: measurement,
|
||||
Fields: fields,
|
||||
Tags: tags,
|
||||
Tags: tagsCopy,
|
||||
Time: t,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user