config = $config; $this->backendAuthSession = $backendAuthSession; $this->newRelicWrapper = $newRelicWrapper; } /** * Adds New Relic custom parameters per adminhtml request for current admin user, if applicable * * @param Observer $observer * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function execute(Observer $observer) { if ($this->config->isNewRelicEnabled()) { if ($this->backendAuthSession->isLoggedIn()) { $user = $this->backendAuthSession->getUser(); $this->newRelicWrapper->addCustomParameter(Config::ADMIN_USER_ID, $user->getId()); $this->newRelicWrapper->addCustomParameter(Config::ADMIN_USER, $user->getUserName()); $this->newRelicWrapper->addCustomParameter( Config::ADMIN_NAME, $user->getFirstName() . ' ' . $user->getLastName() ); } } } }