changes to newrelic

This commit is contained in:
Ralf Teusner
2017-09-20 13:29:26 +02:00
parent 8f372bab04
commit 8d1c846fae
4 changed files with 4 additions and 3 deletions

View File

@ -10,6 +10,7 @@ class ApplicationController < ActionController::Base
rescue_from Pundit::NotAuthorizedError, with: :render_not_authorized
def current_user
::NewRelic::Agent.add_custom_attributes({ external_user_id: session[:external_user_id], session_user_id: session[:user_id] })
@current_user ||= ExternalUser.find_by(id: session[:external_user_id]) || login_from_session || login_from_other_sources
end