class ZipkinTracerProvider implements TracerProvider {

    @Override
    public Map<String, List<String>> updateOutboundHeaders(Span currentSpan,
                                                           Tracer tracer,
                                                           SpanContext parentSpan,
                                                           Map<String, List<String>> outboundHeaders,
                                                           Map<String, List<String>> inboundHeaders) {

        // copy all existing headers to the result
        Map<String, List<String>> result = new HashMap<>(outboundHeaders);

        if (inboundHeaders.isEmpty()) {
            // nothing to do, default to interface implementation
            return result;
        }

        TRACING_CONTEXT_PROPAGATION_HEADERS.forEach(header -> result.computeIfAbsent(header, inboundHeaders::get));

        fixXOtSpanContext(result);

        return result;
    }

}