Example #1
0
 public static function logException(\Exception $exception)
 {
     if (self::$error === true || !self::$currentRootSpan) {
         return;
     }
     // We are only interested in the original exception
     while ($previous = $exception->getPrevious()) {
         $exception = $previous;
     }
     self::$error = true;
     self::$currentRootSpan->annotate(array("err_msg" => $exception->getMessage(), "err_source" => $exception->getFile() . ':' . $exception->getLine(), "err_exception" => get_class($exception), "err_trace" => \Tideways\Profiler\BacktraceConverter::convertToString($exception->getTrace())));
 }