private void setRemoteForException(Subsegment subsegment, Throwable exception) { subsegment.getCause().getExceptions().forEach((e) -> { if (e.getThrowable() == exception) { e.setRemote(true); } }); }
private void setRemoteForException(Subsegment subsegment, Throwable exception) { subsegment.getCause().getExceptions().forEach((e) -> { if (e.getThrowable() == exception) { e.setRemote(true); } }); }
private ThrowableDescription describeThrowable(Throwable throwable, String id) { ThrowableDescription description = new ThrowableDescription(); description.setId(id); description.setMessage(throwable.getMessage()); description.setType(throwable.getClass().getName()); StackTraceElement[] stackTrace = throwable.getStackTrace(); if (stackTrace.length > maxStackTraceLength) { description.setStack(Arrays.copyOfRange(stackTrace, 0, maxStackTraceLength)); description.setTruncated(stackTrace.length - maxStackTraceLength); } else { description.setStack(stackTrace); } description.setThrowable(throwable); if (isRemote(throwable)) { description.setRemote(true); } return description; }
private ThrowableDescription describeThrowable(Throwable throwable, String id) { ThrowableDescription description = new ThrowableDescription(); description.setId(id); description.setMessage(throwable.getMessage()); description.setType(throwable.getClass().getName()); StackTraceElement[] stackTrace = throwable.getStackTrace(); if (stackTrace.length > maxStackTraceLength) { description.setStack(Arrays.copyOfRange(stackTrace, 0, maxStackTraceLength)); description.setTruncated(stackTrace.length - maxStackTraceLength); } else { description.setStack(stackTrace); } description.setThrowable(throwable); if (isRemote(throwable)) { description.setRemote(true); } return description; }