Module: Datadog::Tracing::Contrib::ActionPack::ActionDispatch::Patcher

Includes:
Patcher
Defined in:
lib/datadog/tracing/contrib/action_pack/action_dispatch/patcher.rb

Overview

Patcher for ActionController components

Class Method Summary collapse

Methods included from Patcher

included

Class Method Details

.patchObject



21
22
23
24
25
26
27
# File 'lib/datadog/tracing/contrib/action_pack/action_dispatch/patcher.rb', line 21

def patch
  if ::ActionPack.gem_version >= Gem::Version.new('7.1')
    ::ActionDispatch::Journey::Router.prepend(ActionDispatch::Instrumentation::Journey::LazyRouter)
  else
    ::ActionDispatch::Journey::Router.prepend(ActionDispatch::Instrumentation::Journey::Router)
  end
end

.target_versionObject



17
18
19
# File 'lib/datadog/tracing/contrib/action_pack/action_dispatch/patcher.rb', line 17

def target_version
  Integration.version
end