You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have a big Rails app running on Heroku and using DataDog. There are a few legitimate situations under which we see the following message flooding our consoles and logs:
ERROR -- : Connection refused - connect(2) for "127.0.0.1" port 8126
Some of these situations are:
When compiling assets before a deployment. The Datadog buildpack won't start the agent until the application is actually ready to be started, so during asset compilation our console keeps throwing these, one every second.
Opening up a console. We have configured a "custom" port (the official buildpack still has an agent that listens to port 7777, so we change the port in our Datadog initializer) but that configuration only takes place after initialization. Our application is large enough so that initializing takes a few seconds, during which we see some of those errors popping up in our screen.
Just these two are enough to annoy us very much. We think a simple solution would be to just have the logger attribute on tracer.rb be an attr_writer so that it can be manually configured. We're currently just doing instance_variable_set('@logger', our_logger) to pass a Logger that outputs to a file log instead of the STDOUT.
I would be happy to send a PR if you think this is a reasonable idea. Any thoughts?
The text was updated successfully, but these errors were encountered:
Hi, thanks for reporting this. Indeed, being able to override the default Logger is something which could be very useful. One thing we also consider doing is prefixing our messages when using the default logger, so that messages coming from ddtrace are clearly identified as such (currently, we find identifying them within the flow of a complete app is not convenient).
We currently have a big Rails app running on Heroku and using DataDog. There are a few legitimate situations under which we see the following message flooding our consoles and logs:
Some of these situations are:
Just these two are enough to annoy us very much. We think a simple solution would be to just have the
logger
attribute ontracer.rb
be anattr_writer
so that it can be manually configured. We're currently just doinginstance_variable_set('@logger', our_logger)
to pass aLogger
that outputs to a file log instead of theSTDOUT
.I would be happy to send a PR if you think this is a reasonable idea. Any thoughts?
The text was updated successfully, but these errors were encountered: