@Override
    public void beforeTrace(Trace trace, SpanEventRecorder recorder, Object target, Object[] args) {
        final HttpRequest httpRequest = getHttpRequest(args);
        if (httpRequest == null) {
            return;
        }

        final NameIntValuePair<String> host = getHost();
        TraceId nextId = trace.getTraceId().getNextTraceId();
        recorder.recordNextSpanId(nextId.getSpanId());

        final String hostString = getHostString(host.getName(), host.getValue());
        this.requestTraceWriter.write(httpRequest, nextId, hostString);

        InterceptorScopeInvocation invocation = interceptorScope.getCurrentInvocation();
        if (invocation != null) {
            invocation.getOrCreateAttachment(HttpCallContextFactory.HTTPCALL_CONTEXT_FACTORY);
        }
    }
@author minwoo.jung
@author jaehong.kim
agent-module/plugins/httpclient4/src/main/java/com/navercorp/pinpoint/plugin/httpclient4/interceptor/HttpRequestExecutorExecuteMethodInterceptor.java