Closed bjeanes closed 2 years ago
Thanks for the report. The main reason the instrumentation integration is passing Rodauth app as :controller
(and "call"
as :action
) is to get the log subscriber to print out Processing by RodauthApp#call
, which I believe helps people orient by communicating what is handling the request. It's indeed valid for newrelic_rpm
to assume this is a Rails controller, so I'm not sure how to reconcile these two.
I will take a look at the finish
-related exception.
Thanks @janko! It's 5pm here so I'm about to go offline but if you need any more info, I'll get it to you tomorrow. ✌🏻
Should instead the scope class be passed as another key and rails_controller.name be sent for the controller key?
Just saw your suggestion, it sounds interesting 🤔. It probably wouldn't be entirely accurate, since the Rodauth controller isn't actually processing the request, it's only rendering templates and executing callbacks. However, it might be worth stretching the truth.
Yeah... tricky. It would at least I think address the Processing by ...
use case enough to help orient people.
There are two distinct exceptions I am seeing on every (Rodauth) request:
Start:
Finish:
I am not on the latest versions of either
newrelic_rpm
norrodauth-rails
, but looking at the code of both, I don't believe it will make a material difference to this issue.In
rodauth-rails
, the rodauth config class name is passed as thecontroller
in the instrumentation payload: https://github.com/janko/rodauth-rails/blob/5a5f0a207663522cf428f5e32617a7f0257ee446/lib/rodauth/rails/feature/instrumentation.rb#L35In
newrelic_rpm
, string values for this key areObject.const_get
'd and the code expects it to comply with theActionController::Base
interface (in particular, to respond toActionController::Base.controller_path
):That
newrelic_rpm
constantizes the string is debateable, but its expectation that Rails' instrumentation feature'scontroller
key is a reference to a valid Rails controller is not unreasonable. Should instead the scope class be passed as another key andrails_controller.name
be sent for thecontroller
key?I am not sure about the
finish
-related exception, but I assume it's either caused by the same issue or a similar issue where the values in the instrumentation payload are not actually valid.What do you think @janko?