Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I totally turn off tracing in local development? Why is datadog still trying to make network calls? #4149

Open
alexevanczuk opened this issue Nov 22, 2024 · 1 comment

Comments

@alexevanczuk
Copy link
Contributor

alexevanczuk commented Nov 22, 2024

When I run my Ruby tests, I am getting this:

E, [2023-02-21T00:00:01.175004 #34286] ERROR -- ddtrace: [ddtrace] (/Users/alexevanczuk/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/ddtrace-1.23.3/lib/datadog/tracing/transport/http/client.rb:41:in `rescue in send_request') Internal error during Datadog::Tracing::Transport::HTTP::Client request. Cause: Errno::ECONNREFUSED Failed to open TCP connection to 127.0.0.1:8126 (Connection refused - connect(2) for "127.0.0.1" port 8126) Location: /Users/alexevanczuk/.rbenv/versions/3.3.5/lib/ruby/3.3.0/net/http.rb:1603:in `initialize'

However, I have set this configuration:

require 'ddtrace/auto_instrument'
require 'version_tracking'
require 'datadog/appsec'

is_test = ENV['CI'] || Rails.env.test?
Datadog.configure do |c|
  if !is_test
    # ... sets up tracing
  elsif is_test
    c.tracing.test_mode.enabled = true
  end

  c.env = Rails.env
  c.service = DatadogHelper.service_name
  c.version = git_sha

  c.tags = {...}
end

Thank you for your help!

@Decker87
Copy link

+1 on this request... below is a screenshot showing how overwhelming the datadog output can be.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants