public void handleRequest()

in aws-xray-agent/src/main/java/com/amazonaws/xray/agent/runtime/handlers/downstream/HttpClientHandler.java [34:55]


    public void handleRequest(Event event) {
        HttpServiceDownstreamRequestEvent requestEvent = (HttpServiceDownstreamRequestEvent) event;
        URI uri = getUriFromEvent(requestEvent);

        if (isWithinAWSCall() || isXRaySamplingCall(uri) || isXRayPluginCall(uri)) {
            return;
        }

        String hostName = uri.getHost();
        if (hostName == null) {
            // If we fail to acquire the hostname, we will use the entire URL/service name instead.
            // This is an indication that there's an issue with the request configuration so we
            // use the entire URI so we can provide a subsegment with useful information.
            hostName = requestEvent.getService();
        }
        Subsegment subsegment = beginSubsegment(hostName);

        // Adds http metadata and stores the Trace Header into the request header.
        if (subsegment != null) {
            addRequestInformation(subsegment, requestEvent, uri);
        }
    }