public static Span failSpan()

in src/main/java/com/spotify/github/tracing/TraceHelper.java [39:54]


  public static Span failSpan(final Span span, final Throwable t) {
    if (t instanceof RequestNotOkException) {
      RequestNotOkException ex = (RequestNotOkException) t;
      span.addTag(TraceHelper.TraceTags.HTTP_STATUS_CODE, ex.statusCode())
          .addTag(TraceHelper.TraceTags.ERROR_MESSAGE, ex.getRawMessage());
      if (ex.statusCode() - INTERNAL_SERVER_ERROR >= 0) {
        span.addTag(TraceHelper.TraceTags.ERROR, true);
      }
    } else {
      if (t != null) {
        span.addTag(TraceHelper.TraceTags.ERROR_MESSAGE, t.getMessage());
      }
      span.addTag(TraceHelper.TraceTags.ERROR, true);
    }
    return span;
  }