Sha256: 591c9261ccdcd506d87887a2836a0e4793c295b01f329e8abdc13253250eb089

Contents?: true

Size: 1.26 KB

Versions: 3

Compression:

Stored size: 1.26 KB

Contents

require 'skylight/core/railtie'

module Skylight
  class Railtie < Rails::Railtie
    include Skylight::Core::Railtie

    def self.config_class; Skylight::Config end
    def self.middleware_class; Skylight::Middleware end

    config.skylight = ActiveSupport::OrderedOptions.new

    # The environments in which skylight should be enabled
    config.skylight.environments = ['production']

    # The path to the configuration file
    config.skylight.config_path = "config/skylight.yml"

    # The probes to load
    #   net_http, action_controller, action_view, middleware, and grape are on by default
    #   See https://www.skylight.io/support/getting-more-from-skylight#available-instrumentation-options
    #   for a full list.
    config.skylight.probes = ['net_http', 'action_controller', 'action_view', 'middleware', 'grape']

    # The position in the middleware stack to place Skylight
    # Default is first, but can be `{ after: Middleware::Name }` or `{ before: Middleware::Name }`
    config.skylight.middleware_position = 0

    initializer 'skylight.configure' do |app|
      run_initializer(app)
    end

    private

      def development_warning
        super + "\n(To disable this message for all local apps, run `skylight disable_dev_warning`.)"
      end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
skylight-2.0.0.beta3 lib/skylight/railtie.rb
skylight-2.0.0.beta2 lib/skylight/railtie.rb
skylight-2.0.0.beta1 lib/skylight/railtie.rb