Skip to content

Commit

Permalink
Merge pull request #20 from tverlaan/timestamping-and-batch-sending
Browse files Browse the repository at this point in the history
batch sending of multiple values with timestamping enabled
  • Loading branch information
surik committed Apr 1, 2016
2 parents d837ba3 + 3e64c82 commit 072bbfb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/exometer_report_influxdb.erl
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ maybe_send(OriginMetricName, MetricName, Tags0, Fields,
maps:put(OriginMetricName,
{MetricName, Tags, NewFields, Timestamping andalso unix_time(Precision)},
CollectedMetrics);
{MetricName, Tags, Fields1, _OrigTimestamp} ->
NewFields = maps:merge(Fields, Fields1),
maps:put(OriginMetricName,
{MetricName, Tags, NewFields, Timestamping andalso unix_time(Precision)},
CollectedMetrics);
not_found ->
maps:put(OriginMetricName,
{MetricName, Tags0, Fields, Timestamping andalso unix_time(Precision)},
Expand Down

0 comments on commit 072bbfb

Please sign in to comment.