/**
  * @param \Symfony\Component\HttpKernel\Event\FilterControllerEvent $event
  *
  * @return void
  */
 public function onKernelController(FilterControllerEvent $event)
 {
     $request = $event->getRequest();
     if ($request->attributes->has('controller') && $request->attributes->get('controller') === 'gateway') {
         $this->newRelicApi->addCustomParameter('Call_from', 'Yves');
     }
 }
 /**
  * @param \Symfony\Component\HttpKernel\Event\FilterControllerEvent $event
  *
  * @return void
  */
 public function onKernelController(FilterControllerEvent $event)
 {
     if (!$event->isMasterRequest()) {
         return;
     }
     $request = $event->getRequest();
     $transactionName = $request->attributes->get('_route');
     $requestUri = $request->server->get('REQUEST_URI', 'n/a');
     $host = $request->server->get('COMPUTERNAME', $this->system->getHostname());
     $this->newRelicApi->setNameOfTransaction($transactionName);
     $this->newRelicApi->addCustomParameter('request_uri', $requestUri);
     $this->newRelicApi->addCustomParameter('host', $host);
     if ($this->ignoreTransaction($transactionName)) {
         $this->newRelicApi->markIgnoreTransaction();
     }
 }
 /**
  * @param int|string $sessionId
  *
  * @return bool
  */
 public function destroy($sessionId)
 {
     $key = $this->keyPrefix . $sessionId;
     $startTime = microtime(true);
     $this->connection->del($key);
     $this->newRelicApi->addCustomMetric(self::METRIC_SESSION_DELETE_TIME, microtime(true) - $startTime);
     return true;
 }
Beispiel #4
0
 /**
  * @param int|string $sessionId
  *
  * @return bool
  */
 public function destroy($sessionId)
 {
     $key = $this->keyPrefix . $sessionId;
     $file = $this->savePath . DIRECTORY_SEPARATOR . $key;
     if (file_exists($file)) {
         $startTime = microtime(true);
         unlink($file);
         $this->newRelicApi->addCustomMetric(self::METRIC_SESSION_DELETE_TIME, microtime(true) - $startTime);
     }
     return true;
 }