waisbrot / dogstatsde Goto Github PK
View Code? Open in Web Editor NEWThis project forked from whoopinc/dogstatsde
A StatsD (plus Datadog tag additions) client for Erlang
License: Other
This project forked from whoopinc/dogstatsde
A StatsD (plus Datadog tag additions) client for Erlang
License: Other
Based on Elixir 1.7 release docs looks like changes have been made to :error_logger
in OTP 21, it is not started by default. I had issues running this library on Elixir 1.7. Looks like it is related to lines 127 and 128 in dogstatsd/src/dogstatsd_vm_stats.erl
:
{_, MQL} = process_info(whereis(error_logger), message_queue_len),
dogstatsd:gauge([K,"error_logger_queue_len"], MQL, 1.00),
It will work if I update this to use just logger
and recompile deps:
{_, MQL} = process_info(whereis(logger), message_queue_len),
dogstatsd:gauge([K,"logger_queue_len"], MQL, 1.00),
But I'm not sure if that meets exact purposes of what the library was doing. Seems like this code was supposed to get the error logger backlog, I don't think what I have is specific to errors.
Another workaround is to manually start the error_logger like so: :error_logger.start()
Opening issue to discuss what will be best fix for this? Will using logger
instead of error_logger
deviate from what the original purpose was?
Thanks for your great work here!
I'm able to configure the lib with environment variables easy, eg AGENT_ADDRESS
. Everything works great.
However, I can't sort out how to configure via my config file (Elixir). Below is the error I receive immediately after attempting to send my first stat:
# in my config.exs
config :dogstatsd, agent_address: "172.17.0.1"
# in iex
iex(1)> :dogstatsd.increment("tests.acco", 1, %{})
:ok
# Then immediately after, this error message prints:
iex(2)> [error] GenServer :"wpool_pool-dogstatsd_worker-1" terminating
** (CaseClauseError) no case clause matching: :badarg
(worker_pool 3.1.1) /.../deps/worker_pool/src/wpool_process.erl:155: :wpool_process.handle_cast/2
(stdlib 3.13.2) gen_server.erl:680: :gen_server.try_dispatch/4
(stdlib 3.13.2) gen_server.erl:756: :gen_server.handle_msg/6
(stdlib 3.13.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: {:"$gen_cast", {:cast, {:metric, {:timer, [{"apis.airtable.request_time", 1, 1.0, %{}}]}}}}
State: {:state, :"wpool_pool-dogstatsd_worker-1", :dogstatsd_worker, {:state, #Port<0.1861>, "172.17.0.1", 8125, [], %{}}, [queue_manager: :"wpool_pool-dogstatsd_worker-queue-manager", time_checker: :"wpool_pool-dogstatsd_worker-time-checker", worker: {:dogstatsd_worker, []}, workers: 10, overrun_warning: :infinity, overrun_handler: {:error_logger, :warning_report}, workers: 100, worker_opt: [], queue_type: :fifo]}
I'm sure I'm just missing something simple -- Any pointers/direction would be much appreciated ๐
Thanks,
A
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.