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

ddtrace - throws error when deploying a rails 6.1 instance #3649

Open
rarodriguez94 opened this issue May 15, 2024 · 1 comment
Open

ddtrace - throws error when deploying a rails 6.1 instance #3649

rarodriguez94 opened this issue May 15, 2024 · 1 comment
Assignees
Labels
bug Involves a bug community Was opened by a community member

Comments

@rarodriguez94
Copy link

Current behaviour

ERROR -- ddtrace: [ddtrace] (/usr/local/bundle/gems/ddtrace-1.22.0/lib/datadog/core/remote/negotiation.rb:50:in `endpoint?')

agent reachable but does not report /v0.7/config

Expected behaviour

dd-trace should not throw an error when a instance is deployed.
Will this cause an issue when gathering logs? Currently I see data is getting to datadog, but can't confirm if something is missing

Steps to reproduce

How does datadog help you?

Environment

  • datadog version: 7.0.0.1.0
  • Configuration block (Datadog.configure ...):
  gem 'ddtrace', require: 'ddtrace/auto_instrument'
if [[ $env != "dev" && "$DATADOG_APM" = "true" ]]; then
  export DD_SERVICE=$service
  export DD_VERSION=$version_app

  export DD_APM_ENABLED=true
  export DD_APM_NON_LOCAL_TRAFFIC=true
  export DD_PROFILING_ENABLED=true
  export DD_PROFILING_ALLOCATION_ENABLED=true
  export DD_TRACE_ENABLED=true
  export DD_TRACE_AGENT_URL=http://datadog-agent:8126
fi
require 'ddtrace'

Datadog.configure do |c|
  c.tracing.instrument :rails
end

Datadog::Tracing.before_flush(
  Datadog::Tracing::Pipeline::SpanFilter.new { |span|
    span.name == "rack.request" && span.get_tag("http.url") == "/health"
  }
)
  • Ruby version: 3.1.5
  • Operating system: Linux Debian bookworm (Dockerized)
  • Relevant library versions:
  • bundler: 2.5.9
  • rails: 6.1.4.7
@rarodriguez94 rarodriguez94 added bug Involves a bug community Was opened by a community member labels May 15, 2024
@ivoanjo
Copy link
Member

ivoanjo commented Jun 17, 2024

Hey @rarodriguez94 thanks for reaching out and apologies for taking this long to answer!

So this error happens because the datadog agent deployed on your setup is either outdated (and thus it did not have the remote configuration feature) or has remote configuration explicitly disabled.

If it's the former (an outdated agent), we do recommend looking into updating it :)

You can make ddtrace not even try to hit this endpoint by setting the DD_REMOTE_CONFIGURATION_ENABLED=false environment variable, or via code

Datadog.configure do |c|
  # ... other config ...
  c.remote.enabled = false
end

Let us know if this helps or if we can help in any other way!

@ivoanjo ivoanjo self-assigned this Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug community Was opened by a community member
Projects
None yet
Development

No branches or pull requests

2 participants