DataDog / datadog-go

go dogstatsd client library for datadog
MIT License
353 stars 132 forks source link

Special characters used in the dogstatsd protocol are not escaped #265

Open deadok22 opened 2 years ago

deadok22 commented 2 years ago

The dogstatsd protocol's special characters occurring in metric names and tags are not escaped.

The following characters in tag keys and values should be replaced: |, ,, #, \n. The following characters in metric names should be replaced: |, :, \n.

The java-dogstatsd-client library has the same issue: https://github.com/DataDog/java-dogstatsd-client/issues/199

Some parts of this issue were reported in https://github.com/DataDog/datadog-go/issues/83 and https://github.com/DataDog/datadog-go/issues/211, too.