private static void decodeBaggageItemsFromRequest(NettyHttpRequest request,
                                                          SofaRequest sofaRequest) {
            HttpHeaders headers = request.getHttpHeaders();
            // Decode baggage items
            MultivaluedMap<String, String> headerMaps = headers.getRequestHeaders();
            if (!RpcInvokeContext.isBaggageEnable() || headerMaps == null || headerMaps.isEmpty()) {
                return;
            }

            Map<String, String> baggageItems = new HashMap<String, String>();
            for (Map.Entry<String, List<String>> entry : headerMaps.entrySet()) {
                if (!entry.getKey().startsWith(RPC_REQUEST_BAGGAGE_PREFIX) ||
                    entry.getValue() == null ||
                    entry.getValue().isEmpty()) {
                    continue;
                }

                String value = entry.getValue().get(0);
                String key = entry.getKey().substring(RPC_REQUEST_BAGGAGE_PREFIX_LEN);
                baggageItems.put(key, value);
            }
            sofaRequest.addRequestProp(RemotingConstants.RPC_REQUEST_BAGGAGE, baggageItems);

            BaggageResolver.pickupFromRequest(RpcInvokeContext.peekContext(), sofaRequest, true);
        }
Decode baggage items from netty request to sofa request context

@param request       netty http request
@param sofaRequest   rpc request holder
tracer/tracer-opentracing-resteasy/src/main/java/com/alipay/sofa/rpc/tracer/sofatracer/RestTracerAdapter.java