21
22
23
24
25
26
27
28
29
|
# File 'lib/datadog/tracing/contrib/action_pack/action_dispatch/patcher.rb', line 21
def patch
if ::ActionPack.gem_version >= Gem::Version.new("8.1")
::ActionDispatch::Journey::Router.prepend(ActionDispatch::Instrumentation::Journey::RecognizeRouter)
elsif ::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
|