Sha256: c4629fe8f896f813f85b0e4a3a8b26506f226c1758b754956ce4541ee3f4591e

Contents?: true

Size: 740 Bytes

Versions: 2

Compression:

Stored size: 740 Bytes

Contents

require_relative '../patcher'
require_relative 'action_tracer'
require_relative 'renderer_policy_tracing'
require_relative 'router_tracing'

module Datadog
  module Tracing
    module Contrib
      module Hanami
        # Patcher enables patching of Hanami
        module Patcher
          include Contrib::Patcher

          module_function

          def target_version
            Integration.version
          end

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ddtrace-1.10.1 lib/datadog/tracing/contrib/hanami/patcher.rb
ddtrace-1.10.0 lib/datadog/tracing/contrib/hanami/patcher.rb