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); } }
/** * Get the New Relic agent instance * * @return \NewRelic\NewRelic */ public function instance() { return NewRelicAgent::getInstance(); }