void handleError(Throwable e, Supplier<String> defaultLogMessage, Callback<Void> callback) {
    propagateIfFatal(e);
    callback.onError(e);
    if (!logger.isDebugEnabled()) return;

    String error = e.getMessage() != null ? e.getMessage() : "";
    // We have specific code that customizes log messages. Use this when the case.
    if (error.startsWith("Malformed") || error.startsWith("Truncated")) {
      logger.debug(error, e);
    } else { // otherwise, beautify the message
      String message =
        "%s due to %s(%s)".formatted(defaultLogMessage.get(), e.getClass().getSimpleName(), error);
      logger.debug(message, e);
    }
  }
When storing spans, an exception can be raised before or after the fact. This adds context of
span ids to give logs more relevance.
zipkin-collector/core/src/main/java/zipkin2/collector/Collector.java