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

Falcon instrumentation #2383

Merged
merged 5 commits into from Jan 4, 2024
Merged

Falcon instrumentation #2383

merged 5 commits into from Jan 4, 2024

Conversation

hannahramadan
Copy link
Contributor

@hannahramadan hannahramadan commented Jan 3, 2024

The agent will now report Falcon as a recognized webserver.

Closes #2188

Note: This PR defers adding tests to a separate ticket.

@@ -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)
Copy link
Contributor Author

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.

@hannahramadan hannahramadan marked this pull request as ready for review January 3, 2024 22:17
Copy link
Contributor

@tannalynn tannalynn left a 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?

hannahramadan and others added 2 commits January 4, 2024 15:10
Co-authored-by: James Bunch <fallwith@gmail.com>
@@ -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])
Copy link
Contributor

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.

socketry/falcon#53 (comment)

It makes sense to always defer when Falcon is in play.

Copy link

github-actions bot commented Jan 4, 2024

SimpleCov Report

Coverage Threshold
Line 93.68% 93%
Branch 71.77% 71%

@hannahramadan hannahramadan merged commit 01befa0 into dev Jan 4, 2024
28 checks passed
@hannahramadan hannahramadan deleted the falcon_instrumentation branch April 12, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add Support for Falcon
3 participants