@Override
    public void beforeTrace(Trace trace, SpanEventRecorder recorder, Object target, Object[] args) {
        if (Boolean.FALSE == (target instanceof HttpMethod)) {
            return;
        }
        final HttpMethod httpMethod = (HttpMethod) target;

        // generate next trace id.
        final TraceId nextId = trace.getTraceId().getNextTraceId();
        recorder.recordNextSpanId(nextId.getSpanId());

        // set http header for trace.
        final HttpConnection httpConnection = getHttpConnection(args);
        final String host = getHost(httpMethod, httpConnection);
        this.requestTraceWriter.write(httpMethod, nextId, host);
        // init attachment for io(read/write).
        initAttachment();
    }
@author Minwoo Jung
@author jaehong.kim
agent-module/plugins/httpclient3/src/main/java/com/navercorp/pinpoint/plugin/httpclient3/interceptor/HttpMethodBaseExecuteMethodInterceptor.java