Sha256: 05e579626505838cc245f5291b5f30d8527e987d2fa1004c68c37a7f563a7f75

Contents?: true

Size: 629 Bytes

Versions: 5

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true

# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

module OpenTelemetry
  module Instrumentation
    module ActionPack
      # This Railtie installs Rack middleware to support Action Pack instrumentation
      class Railtie < ::Rails::Railtie
        config.before_initialize do |app|
          OpenTelemetry::Instrumentation::Rack::Instrumentation.instance.install({})

          app.middleware.insert_before(
            0,
            *OpenTelemetry::Instrumentation::Rack::Instrumentation.instance.middleware_args
          )
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
opentelemetry-instrumentation-action_pack-0.10.0 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.9.0 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.8.0 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.7.1 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.7.0 lib/opentelemetry/instrumentation/action_pack/railtie.rb