Skip to content

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

@sanjaiganesh

Description

@sanjaiganesh

@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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions