Exemplo n.º 1
0
 public function testStartTransaction()
 {
     $name = 'foo';
     $licence = 'bar9000';
     $result = true;
     $handler = $this->getHandlerSpy('newrelic_start_transaction', array($name, $licence), $result);
     $agent = new Newrelic(false, $handler);
     $this->assertSame($result, $agent->startTransaction($name, $licence));
 }
Exemplo n.º 2
0
 /**
  * If you have ended a transaction before your script terminates (perhaps due to it just having finished a task in a
  * job queue manager) and you want to start a new transaction, use this call. This will perform the same operations
  * that occur when the script was first started. Of the two arguments, only the application name is mandatory.
  * 
  * However, if you are processing tasks for multiple accounts, you may also provide a license for the associated
  * account. The license set for this API call will supersede all per-directory and global default licenses
  * configured in INI files.
  *
  * @param string $name
  * @param string $license
  * @return mixed 
  * @static 
  */
 public static function startTransaction($name, $license = '')
 {
     return \Intouch\Newrelic\Newrelic::startTransaction($name, $license);
 }