Module: Datadog::Tracing::Contrib::Hanami::Patcher

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

Overview

Patcher enables patching of Hanami

Class Method Summary collapse

Methods included from Patcher

included

Class Method Details

.patchObject



22
23
24
25
26
27
28
# File 'lib/datadog/tracing/contrib/hanami/patcher.rb', line 22

def patch
  # For auto instrumentation, `plugin` must be required before `Hanami.boot`
  require_relative 'plugin'

  ::Hanami::Router.prepend(RouterTracing)
  ::Hanami::RenderingPolicy.prepend(RendererPolicyTracing)
end

.target_versionObject



18
19
20
# File 'lib/datadog/tracing/contrib/hanami/patcher.rb', line 18

def target_version
  Integration.version
end