Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grape padrino framework detection #2789

Merged
merged 5 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/new_relic/agent/configuration/default_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@ def self.framework
::NewRelic::Agent.logger.warn("Detected untested Rails version #{Rails::VERSION::STRING}")
:rails_notifications
end
when defined?(::Padrino) && defined?(::Padrino::PathRouter::Router) then :padrino
when defined?(::Sinatra) && defined?(::Sinatra::Base) then :sinatra
when defined?(::Roda) then :roda
when defined?(::Grape) then :grape
when defined?(::NewRelic::IA) then :external
else :ruby
end
Expand Down
14 changes: 14 additions & 0 deletions lib/new_relic/control/frameworks/grape.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

require 'new_relic/control/frameworks/ruby'
module NewRelic
class Control
module Frameworks
# Contains basic control logic for Grape
class Grape < NewRelic::Control::Frameworks::Ruby
end
end
end
end
14 changes: 14 additions & 0 deletions lib/new_relic/control/frameworks/padrino.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

require 'new_relic/control/frameworks/sinatra'
module NewRelic
class Control
module Frameworks
# Contains basic control logic for Padrino
class Padrino < NewRelic::Control::Frameworks::Sinatra
end
end
end
end
Loading