Skip to content

Commit

Permalink
Fix Flume UDP source delimiter error (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
awegrzyn authored Jul 6, 2018
1 parent 2a5c60d commit 5e78256
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Backends/Flume.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void Flume::send(std::vector<Metric>&& metrics)
std::string flumeMetrics = "";
for (auto& metric : metrics) {
flumeMetrics += metricToJson(metric);
flumeMetrics += "\n";
flumeMetrics += '\n';
}
mTransport->send(std::move(flumeMetrics));
}
Expand Down Expand Up @@ -84,7 +84,9 @@ std::string Flume::metricsToJson(std::string measurement, std::vector<Metric>&&

void Flume::send(const Metric& metric)
{
mTransport->send(metricToJson(metric));
std::string toSend = metricToJson(metric);
toSend += '\n';
mTransport->send(std::move(toSend));
}

inline unsigned long Flume::convertTimestamp(const std::chrono::time_point<std::chrono::system_clock>& timestamp)
Expand Down

0 comments on commit 5e78256

Please sign in to comment.