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

Prevent undfined method error in Action Controller instrumentation #1844

Merged
merged 6 commits into from
Feb 28, 2023

Conversation

tannalynn
Copy link
Contributor

If the action controller instrumentation was being called for a class that didn't respond to controller_path, the agent would error when trying to create the metric name for the segment. Now it will always check to make sure that method will work before calling it. I also updated this section to use the safe navigation operator now that we only support ruby 2.4+.

closes #1842

@tannalynn tannalynn marked this pull request as ready for review February 27, 2023 21:34
fallwith
fallwith previously approved these changes Feb 27, 2023
Co-authored-by: Kayla Reopelle (she/her) <[email protected]>
@github-actions
Copy link
Contributor

SimpleCov Report

Coverage Threshold
Line 93.96% 93%
Branch 85.37% 84%

Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦄

@tannalynn tannalynn merged commit bc3af6e into dev Feb 28, 2023
@fallwith fallwith mentioned this pull request Mar 29, 2023
@tannalynn tannalynn deleted the bugfix/action_controller_controller_path branch June 23, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

undefined method 'controller_path' errors filling up logs since 8.16.0 upgrade
3 participants