Skip to content

Commit

Permalink
Skip patching for Rails 3
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotc committed Jan 13, 2024
1 parent 2bc87c4 commit e4aa83a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/datadog/tracing/contrib/rails/patcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def before_initialize(app)
# Sometimes we don't want to activate middleware e.g. OpenTracing, etc.
add_middleware(app) if Datadog.configuration.tracing[:rails][:middleware]

ActionDispatch::Journey::Router.prepend(JourneyRouterPatch)
# ActionDispatch::Journey not available in Rails 3.2
ActionDispatch::Journey::Router.prepend(JourneyRouterPatch) if defined?(ActionDispatch::Journey::Router)

Rails::LogInjection.configure_log_tags(app.config)
end
Expand Down

0 comments on commit e4aa83a

Please sign in to comment.