smira / go-statsd

Go statsd client library with zero allocation overhead, great performance and reconnects
MIT License
109 stars 18 forks source link

Okmeter tag format #33

Closed doc-sheet closed 9 months ago

doc-sheet commented 10 months ago

Hello! Could you add an okmeter tag support? I guess I can't simply use basic TagFormat because separator is a string _is_

smira commented 10 months ago

Looks like tags are sent as part of the metric name, so the library itself doesn't have to be changed?

You can just send "value.tag_is_value" and everything is good? If needed, you can make a wrapper for syntactic sugar?

doc-sheet commented 10 months ago

You can just send "value.tag_is_value" and everything is good? If needed, you can make a wrapper for syntactic sugar?

Indeed. It's a common workaround, I just wanted to use standart method for tags. Could you maybe change type of KeyValueSeparator to string or []byte?

smira commented 10 months ago

if you have a PR, I could take a look. Please keep in mind it should be optimized for low memory allocations in either case.

doc-sheet commented 10 months ago

Sure. I try golang for like less then a week, but here is my proposal https://github.com/smira/go-statsd/pull/34

doc-sheet commented 9 months ago

Thank you!