gphat / censorinus Goto Github PK
View Code? Open in Web Editor NEWCensorinus is a Scala *StatsD client with multiple personalities.
License: MIT License
Censorinus is a Scala *StatsD client with multiple personalities.
License: MIT License
Hey @gphat, i've seen that scala 2.13 support is merged in the master branch. Is it possible to publish it ?
The metrics 2.0 spec is interesting. It seems that unit is the only addition that would be required, aside from an encoder.
DogStatsD's sample rate uses a pipe in front. StatsD doesn't.
The DogStatsD encoder test should be modified to match the StatsDEncoder test.
I would like to add tags to my counters when sending data to telegraf.
Similar to this:
> time code host message metric_type value
> ---- ---- ---- ------- ----------- -----
> 1556787040000000000 200 server-3 success counter 1
> 1556787120000000000 200 server-3 success counter 5
>
Here, code and message being the custom tag, I did through python client.
Same can be done using this library?
We tried to use your library, but there is no output, even when using the client this way:
new StatsDClient(hostname = "localhost",
port = 8125,
asynchronous = false,
allowExceptions = true)
We can see data which we pushed via nc
like'
echo "foo.bar 42 `date +%s`" | nc -c 127.0.0.1 2003
Is there a way to enable debugging?
We are running this docker image: https://github.com/kamon-io/docker-grafana-graphite
Tried also another image, which is not working as well: https://github.com/hopsoft/docker-graphite-statsd
The DogStatsDClient
is not not using prefix parameter for events names whereas the official statsd client from datadog does.
I think this library should have a behaviour as close as possible to the datadog official library.
It's common for StatsD clients to allow setting a prefix for any metrics, saving some typing. Add it.
This will make it easier to pass in fake/mock clients and test dogstatsdclient. Specifically, I'm currently having problems hitting socket limits since I can't stop my mocked DogStatsDClient
from creating a UDPSender in another class that uses DogStatsDClient
(using ScalaMock).
From @jpellerin:
From scala @com_github_gphat_censorinus//:censorinus:
external/com_github_gphat_censorinus/src/main/scala/github/gphat/censorinus/dogstatsd/Encoder.scala:71: warning: Using toString on something that is already of type String.
sb.append(h.toString)
^
external/com_github_gphat_censorinus/src/main/scala/github/gphat/censorinus/dogstatsd/Encoder.scala:75: warning: Using toString on something that is already of type String.
sb.append(ak.toString)
^
external/com_github_gphat_censorinus/src/main/scala/github/gphat/censorinus/dogstatsd/Encoder.scala:128: warning: Using toString on something that is already of type String.
sb.append(h.toString)
^
three warnings found
These aren't client agnostic, but I'm pretty sure I left room for client implementations to have different features.
Telegraf logs show lines like these:
2021-04-07T08:21:11Z E! [inputs.statsd] Parsing value to float64, unable to parse metric: xxx.yyy.zzz:2,2|g
Note that I have LANG=fi_FI.UTF-8
which should have comma (,
) as the decimal separator. (This is of course only a problem when testing on my own workstation.)
The metric is sent like this client.gauge("yyy.zzz", doubleValue, tags)
It seems that in github.gphat.censorinus.dogstatsd.Encoder
the value format is initialized as:
val format = new DecimalFormat("0.################")
I think it should be initialized with ROOT locale:
val format = new DecimalFormat("0.################", new DecimalFormatSymbols(Locale.ROOT))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.