Skip to content

Commit 5e78256

Browse files
authored
Fix Flume UDP source delimiter error (#61)
1 parent 2a5c60d commit 5e78256

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Backends/Flume.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void Flume::send(std::vector<Metric>&& metrics)
5050
std::string flumeMetrics = "";
5151
for (auto& metric : metrics) {
5252
flumeMetrics += metricToJson(metric);
53-
flumeMetrics += "\n";
53+
flumeMetrics += '\n';
5454
}
5555
mTransport->send(std::move(flumeMetrics));
5656
}
@@ -84,7 +84,9 @@ std::string Flume::metricsToJson(std::string measurement, std::vector<Metric>&&
8484

8585
void Flume::send(const Metric& metric)
8686
{
87-
mTransport->send(metricToJson(metric));
87+
std::string toSend = metricToJson(metric);
88+
toSend += '\n';
89+
mTransport->send(std::move(toSend));
8890
}
8991

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

0 commit comments

Comments
 (0)