StatsN icon indicating copy to clipboard operation
StatsN copied to clipboard

Adds new line at the end of the metric's network data representation

Open sanjaiganesh opened this issue 6 years ago • 2 comments

@TerribleDev We are trying to use this library (thanks) and noticed that it adds 'new line char' to the end of the network stream, even for single metric. Due to this, metric upload failing in our environment. Per StatsD protocol, newlines used to separate when multiple metrics are transfered in single payload (not for single metric).

If you agree, I could create a PR to change the behavior.

nternal Task SendMetric(string metric) { var payload = Encoding.ASCII.GetBytes(metric + Environment.NewLine); if (Options.BufferMetrics) { .......................................... } return SendAsync(payload); }

sanjaiganesh avatar Apr 15 '19 04:04 sanjaiganesh

sure np

TerribleDev avatar Apr 20 '19 11:04 TerribleDev

@sanjaiganesh havn't seen any Pull requests from you yet...

TerribleDev avatar Apr 28 '19 12:04 TerribleDev