private Map<String, Object> createHeader(AMQP.BasicProperties properties, Trace trace) {
        final Map<String, Object> headers = copyHeader(properties);
        if (trace.canSampled()) {
            TraceId nextId = retrieveNextTraceId();
            if (nextId == null) {
                return null;
            }
            headers.put(RabbitMQClientConstants.META_TRACE_ID, nextId.getTransactionId());
            headers.put(RabbitMQClientConstants.META_SPAN_ID, Long.toString(nextId.getSpanId()));
            headers.put(RabbitMQClientConstants.META_PARENT_SPAN_ID, Long.toString(nextId.getParentSpanId()));
            headers.put(RabbitMQClientConstants.META_PARENT_APPLICATION_TYPE, Short.toString(traceContext.getServerTypeCode()));
            headers.put(RabbitMQClientConstants.META_PARENT_APPLICATION_NAME, traceContext.getApplicationName());
            headers.put(RabbitMQClientConstants.META_FLAGS, Short.toString(nextId.getFlags()));
        } else {
            headers.put(RabbitMQClientConstants.META_SAMPLED, "1");
        }
        return headers;
    }
<p>{@code AMQContentHeader} received as an argument to the constructor is sharable and can be reused, such as
{@code MessageProperties.MINIMAL_BASIC}. Any changes made to it (ie injecting pinpoint headers) may have undesirable
consequences.

<p>Hence, we make a copy via {@code ChannelAspect} and add pinpoint headers to it when propagating trace, and have
{@code AMQCommand} use this.

@author HyunGil Jeong

@see com.navercorp.pinpoint.plugin.rabbitmq.client.aspect.ChannelAspect
agent-module/plugins/rabbitmq/src/main/java/com/navercorp/pinpoint/plugin/rabbitmq/client/interceptor/AMQCommandConstructInterceptor.java