DataDog / dd-trace-java

Datadog APM client for Java
https://docs.datadoghq.com/tracing/languages/java
Apache License 2.0
564 stars 282 forks source link

Outgoing http requests are not instrumented with datadog tracer - Spring Boot / RestClient / Eclipse Jetty Client 12.0.5 #7300

Closed lokesh1729 closed 1 month ago

lokesh1729 commented 1 month ago

Hi,

Outgoing http requests are not instrumented with datadog tracer. I am using java, spring boot, restclient with jetty 12.0.5 as http client. Here's my configuration of restclient...

We have other microservices where we were using OkHttp3 and the tracing is working fine. We pull the latest tracer in our deployment configuration and the docker files are same for every microservice.

Is jetty http client not supported?

@Bean
public RestClient httpClient() {
    HttpClient httpClient = new HttpClient() {
        @Override
        public Request newRequest(URI uri) {
            Request request = super.newRequest(uri);
            request = loggingService.logRequestResponse(request);
            return middleware.handle(request);
        }
    };
    httpClient.setConnectTimeout(1000);
    httpClient.setIdleTimeout(15000);
    JettyClientHttpRequestFactory requestFactory = new JettyClientHttpRequestFactory(httpClient);
    requestFactory.setReadTimeout(Duration.ofMillis(60000));

    return RestClient.builder()
            .baseUrl(baseUrl)
            .requestFactory(requestFactory)
            .defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
            .defaultHeader(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
            .build();
}
amarziali commented 1 month ago

👋 Hi @lokesh1729 thanks for having opened the issue. Indeed jetty 12 is not yet supported. However we're (right now) working at a PR to fix it so it will be available shortly

lokesh1729 commented 1 month ago
        Hi Andrea,Thanks for the update. Any rough timelines you can share? so that we will plan our work accordingly.- LOKESH SANAPALLI- https://lokesh1729.com    ---- On Wed, 10 Jul 2024 21:48:05 +0530  ***@***.******@***.***> wrote ----  

👋 Hi @lokesh1729 thanks for having opened the issue. Indeed jetty 12 is not yet supported. However we're (right now) working at a PR to fix it so it will be available shortly

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

amarziali commented 1 month ago

The PR to support this version has just been merged. It will be available in the next release (1.38.0) foresee for start of August

github-actions[bot] commented 1 month ago

:robot: This issue has been addressed in the latest release. See full details in the Release Notes.