Sha256: 19c98ce5e205ba93bbeefb8a2e8fd8634aa3c5562364fe0cf029544bdfe387c1

Contents?: true

Size: 507 Bytes

Versions: 4

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

require "appsignal"
require "appsignal/rack/sinatra_instrumentation"

Appsignal.internal_logger.debug("Loading Sinatra (#{Sinatra::VERSION}) integration")

unless Appsignal.active?
  app_settings = ::Sinatra::Application.settings
  Appsignal.config = Appsignal::Config.new(
    app_settings.root || Dir.pwd,
    app_settings.environment
  )

  Appsignal.start_logger
  Appsignal.start
end

::Sinatra::Base.use(Appsignal::Rack::SinatraBaseInstrumentation) if Appsignal.active?

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
appsignal-3.9.1-java lib/appsignal/integrations/sinatra.rb
appsignal-3.9.1 lib/appsignal/integrations/sinatra.rb
appsignal-3.9.0-java lib/appsignal/integrations/sinatra.rb
appsignal-3.9.0 lib/appsignal/integrations/sinatra.rb