예제 #1
0
 public function init()
 {
     parent::init();
     if ($this->enabled && Agent::isLoaded()) {
         $this->name = $this->name ? $this->name : \Yii::$app->name;
         $this->agent = new Agent();
         $this->agent->setAppname($this->name, $this->licence);
     }
 }
예제 #2
0
 /**
  * Get the New Relic agent instance
  *
  * @return \NewRelic\NewRelic
  */
 public function instance()
 {
     return NewRelicAgent::getInstance();
 }