コード例 #1
0
 public function testAddCustomTracer()
 {
     $functionName = 'bar';
     $result = true;
     $handler = $this->getHandlerSpy('newrelic_add_custom_tracer', array($functionName), $result);
     $agent = new Newrelic(false, $handler);
     $this->assertSame($result, $agent->addCustomTracer($functionName));
 }
コード例 #2
0
ファイル: _ide_helper.php プロジェクト: retailone/retailone
 /**
  * API equivalent of the newrelic.transaction_tracer.custom setting. It allows you to add user defined functions or
  * methods to the list to be instrumented. Internal PHP functions cannot have custom tracing.
  * 
  * NOTE: $function_name should be in the format 'foo' or 'Foo::Bar' as a string, not the PHP callable array format.
  *
  * @param string $function_name
  * @return mixed 
  * @static 
  */
 public static function addCustomTracer($function_name)
 {
     return \Intouch\Newrelic\Newrelic::addCustomTracer($function_name);
 }