-
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
ActionView::Template::Error: undefined method `identifier' #2869
Comments
👋🏻 this method should never have been used, as it was marked |
Closing, as #2870 has been merged. For anyone coming across this issue in the future:
|
This issue brought the whole production down (every single page). How can we enable |
Hi @ZilvinasKucinskas (cc @hasghari). We are sorry for the poor experience that this issue caused for you. We endeavor to make the agent's instrumentation logic bullet-proof so that even when it crashes it doesn't impact the original Ruby library's functionality, but this error unfortunately did impact the core functionality. The original issue (now fixed in the latest available New Relic Ruby agent gem, v9.14.0) was caused by using We appreciate the unfortunate surprise element of your situation that resulted from not introducing Here are 2 ways to potentially prevent future similar issues with
I think option 2 best addresses this question. Hopefully option 1 is useful to some as well. |
I will share the default @fallwith Would you mind checking what's missing? Sample newrelic.yml
|
@ZilvinasKucinskas your config looks fine to me. In your dev/test environments, as long as you see "Installing ViewComponent instrumentation" in the New Relic agent log then the ViewComponent code from the agent is running. As long as the exact same version of the Ruby library ( |
@fallwith I have just tested with |
I see, @ZilvinasKucinskas. I apologize for giving you information that did not work. I was under the impression that I have created a new issue #2882 to track this further. Your desired scenario of active instrumentation without billing sounds great to me, and hopefully we can support that in future either with |
Thanks for creating an issue for it, @fallwith! 🙇♂️ In the test environment, many Rails projects are usually using WebMock and disable external connections. Therefore, this mode would be highly valuable! I guess on your end you would just "ignore" API calls to New Relic and stub them to always be successful without ever being called. |
FYI, we've decided to make this method part of the public API ❤ ViewComponent/view_component#2153 |
Description
Running view_component with recent change ViewComponent/view_component@451543a#diff-b69c75ffd85596e0b5fca1327059ecf3b2930f3f77004c78a268fa85e8ec8d9eL601
Makes the following error in our production server:
ActionView::Template::Error: undefined method
identifier' for class LinkComponent`Expected Behavior
Your method metric_path manage already if the identifier is not set to "component" but the problem is coming from in render_in_with_tracing that is doing self.class.identifier
Your Environment
ruby 3.3.4 (2024-07-09 revision be1089c8ec) +YJIT [arm64-darwin23]
gem view_component (3.15.0)
gem newrelic_rpm (9.13.0)
For Maintainers Only or Hero Triaging this bug
Suggested Priority (P1): We had to pin to pin view_component to 3.14.0 otherwise we were getting a lot of errors
The text was updated successfully, but these errors were encountered: