-
Notifications
You must be signed in to change notification settings - Fork 600
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
Falcon instrumentation #2383
Falcon instrumentation #2383
Conversation
lib/new_relic/local_environment.rb
Outdated
@@ -138,6 +139,13 @@ def check_for_puma | |||
end | |||
end | |||
|
|||
def check_for_falcon | |||
if defined?(::Falcon::Server) && NewRelic::LanguageSupport.object_space_usable? | |||
v = find_class_in_object_space(::Falcon::Server) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A similar object space check that we do for Unicorn and Thin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Could you add a changelog entry for this?
Co-authored-by: James Bunch <[email protected]>
@@ -10,7 +10,7 @@ module SpecialStartup | |||
# requests, we need to wait until the children are forked | |||
# before connecting, otherwise the parent process sends useless data | |||
def using_forking_dispatcher? | |||
if [:puma, :passenger, :unicorn].include?(Agent.config[:dispatcher]) | |||
if [:puma, :passenger, :unicorn, :falcon].include?(Agent.config[:dispatcher]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Falcon was added to this list because of its ability to fork. Falcon can also run in a threaded mode instead of a forking one, but given that:
There is no guarantee that your process would be forked or threaded.
It makes sense to always defer when Falcon is in play.
SimpleCov Report
|
The agent will now report Falcon as a recognized webserver.
Closes #2188
Note: This PR defers adding tests to a separate ticket.