docs: public static void addSpanErrorInfo(Span span, Throwable exception) {
          String methodName = "addSpanErrorInfo";
  
          span.setTag(Tags.ERROR.getKey(), true);
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, methodName + " error", Boolean.TRUE);
          }
  
          if (exception != null) {
              Map<String, Object> log = new HashMap<>();
              // https://github.com/opentracing/specification/blob/master/semantic_conventions.md#log-fields-table
              log.put("event", "error");
  
              // Throwable implements Serializable so all exceptions are serializable
              log.put("error.object", exception);
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, methodName + " adding log entry", log);
              }
  
              span.log(log);
          }
      }