Changing AddValues to AddFields and temp disabling adding w time
Currently adding with time is broken, because InfluxDB does not support using precision for timestamp truncation both with and without timestamps. This will be re-enabled once we fix InfluxDB to use the precision argument for truncation in all cases, and a "unit" argument in the line-protocol for adding points with non-nanosecond stamps Fixes #175
This commit is contained in:
@@ -93,7 +93,7 @@ func emitMetrics(k *Kafka, acc plugins.Accumulator, metricConsumer <-chan []byte
|
||||
}
|
||||
|
||||
for _, point := range points {
|
||||
acc.AddValuesWithTime(point.Name(), point.Fields(), point.Tags(), point.Time())
|
||||
acc.AddFieldsWithTime(point.Name(), point.Fields(), point.Tags(), point.Time())
|
||||
}
|
||||
case <-timeout:
|
||||
return nil
|
||||
|
||||
@@ -89,7 +89,7 @@ func (d *MongodbData) addStat(acc plugins.Accumulator, statLine reflect.Value, s
|
||||
}
|
||||
|
||||
func (d *MongodbData) add(acc plugins.Accumulator, key string, val interface{}) {
|
||||
acc.AddValuesWithTime(
|
||||
acc.AddFieldsWithTime(
|
||||
key,
|
||||
map[string]interface{}{
|
||||
"value": val,
|
||||
|
||||
@@ -10,8 +10,8 @@ type Accumulator interface {
|
||||
|
||||
// Create a point with a set of values, decorating it with tags
|
||||
// NOTE: tags and values are expected to be owned by the caller, don't mutate
|
||||
// them after passing to AddValuesWithTime.
|
||||
AddValuesWithTime(
|
||||
// them after passing to AddFieldsWithTime.
|
||||
AddFieldsWithTime(
|
||||
measurement string,
|
||||
values map[string]interface{},
|
||||
tags map[string]string,
|
||||
|
||||
Reference in New Issue
Block a user