package com.hz.pm.api.common.util;

import org.slf4j.MDC;

/**
 * <p>
 * MDCUtil
 * </p>
 *
 * @author WendyYang
 * @since 2023/10/26
 **/
public class MDCUtil {

    private MDCUtil() {
    }

    public static final String TRACE_ID = "traceId";
    public static final String TRACE_ID_HEADER = "Trace-Id";

    public static void setTraceId(String traceId) {
        MDC.put(TRACE_ID, traceId);
    }

    public static void removeTraceId() {
        MDC.remove(TRACE_ID);
    }

}
