-
Notifications
You must be signed in to change notification settings - Fork 369
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
Unable to patch Datadog::Contrib::Rails::Integration (Available?: false, Loaded? true, Compatibl e? false, Patchable? false) #993
Comments
Hi @mustela, I noticed "Available?: false" in your output, meaning the method dd-trace-rb/lib/ddtrace/contrib/patchable.rb Lines 17 to 19 in 7125d11
Which, for the Rails integration, means that dd-trace-rb/lib/ddtrace/contrib/rails/integration.rb Lines 18 to 20 in 7125d11
This leads me to believe that Rails was not Would you mind sharing how you configure |
Sure, this is the content
And the path is |
How are you loading the application? Not sure how Without a code sample to replicate this one, its going to be hard to say how this happened, and you might have to dig a bit deeper on your end. For what its worth, I'm not seeing this when doing the same in a default Rails 5 application and running |
Hey guys, thanks for your help and sorry for my delay! So, yes, the issue was that I was not using the rails gem, but including only the parts that I needed like
So that was the issue, putting back the gem fixed the problem. Thanks |
why do we need a rails gem explicitly on the new version of ddtrace why not on the older version ? @delner Local, with ddtrace - 0.32.0 |
looks like it broke from https://github.com/DataDog/dd-trace-rb/releases/tag/v0.33.0 |
Specifically this PR #944 which enforces a |
Hi @bheemreddy181 and @vramaiah, thank you for the update! I've tried to reproduce the issue and get the same output you provided, but I'm not able to. Here's what I tried: require 'bundler/inline'
ddtrace_version = ARGV[0]
rails_gem = ARGV[1] == "true"
gemfile do
source 'https://rubygems.org'
if rails_gem
gem 'rails', '5.2.0'
else
gem 'actioncable', '5.2.0'
gem 'actionmailer', '5.2.0'
gem 'actionpack', '5.2.0'
gem 'actionview', '5.2.0'
gem 'activejob', '5.2.0'
gem 'activemodel', '5.2.0'
gem 'activerecord', '5.2.0'
gem 'activestorage', '5.2.0'
gem 'activesupport', '5.2.0'
end
gem 'ddtrace', ddtrace_version
end
Datadog.configure do |c|
c.use :rails
end
puts "Datadog.registry[:rails].patcher.patched? = #{Datadog.registry[:rails].patcher.patched?}"
I also checked again the suspected culprit file, https://github.com/DataDog/dd-trace-rb/pull/944/files#diff-1081fc5d9e2a72bd75729272da38a396, and we did make changes to the way we check for the presence of Rails, but the outcomes are still the same when I tested:
Both will return false unless the meta-gem
I'm likely missing something in my efforts to reproduce it, please let me know if there's any other information from you application that I'm not capturing in my test setup. |
@mustela @bheemreddy181 @vramaiah I think #1054 should address this issue if your apps are not using |
@delner sounds great thanks for the fix we will give a try post new release |
We tested this version of gem in our local , we could see all these changes working as expected
with the below source
|
Hey @mustela, @bheemreddy181, @vramaiah! We've just released 0.36.0, which ships a fix to allow for more leaning Rails detection (#1054): we now only need to find Let us know if the issue persists after this release. |
Cool thanks :-) will keep you posted. |
Hey guys, I can no longer see stats of my service and Im seeing a warning in the logs
Im using:
Is there any way I can manually test if the integration is working as expected?
Thanks!
The text was updated successfully, but these errors were encountered: