Sha256: 98b34a016ddb3ac17e794cafb9aca81bffef28bb579e327a7b4547eb7e4ba0ea

Contents?: true

Size: 617 Bytes

Versions: 14

Compression:

Stored size: 617 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::Middlewares::TracerMiddleware
          )
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
opentelemetry-instrumentation-action_pack-0.6.0 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.5.0 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.4.1 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.4.0 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.3.2 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.3.1 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.3.0 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.2.1 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.2.0 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.1.4 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.1.3 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.1.2 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.1.1 lib/opentelemetry/instrumentation/action_pack/railtie.rb
opentelemetry-instrumentation-action_pack-0.1.0 lib/opentelemetry/instrumentation/action_pack/railtie.rb