-
Notifications
You must be signed in to change notification settings - Fork 90
Open
SalesLoft/statix
#3Description
Hi,
We've been happily using statix for our statsd needs (thanks!), and I'd like to play around with the distributions type, which datadog introduced a little while ago. To my understanding, it works by sending metrics with type d to the datadog statsd agent.
I looked at the code and currently the metric types are hard coded and rather difficult to extend without replacing both Conn and Packet...
Maybe something like the following could be supported?
defmodule MyApp.Statix do
use Statix, custom_metrics_types: %{dd_distribution: "d"}
def distribution(key, val \\ 1, options \\ []) when is_number(val) do
Statix.transmit(current_conn(), :dd_distribution, key, val, options)
end
endLet me know if this sounds like a reasonable approach; I'd be happy to work on it and provide a pull request!
hkrutzer, dcaixinha, rafaelgaspar, Kitton, mseebacher and 3 more
Metadata
Metadata
Assignees
Labels
No labels