Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

apache httpclient 5 - http calls done in interceptors not instrumented

Đang mở
#10,383 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@vandonr đang làm issue này rồi.

Từ ngày 17/2/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

inst: apache httpcomponents type: bug report
Tracer Version(s)

1.57.0

Java Version(s)

25

JVM Vendor

Eclipse Adoptium / Temurin

Bug Report

When using apache httpclient v5, it is possible to do http requests from with exec interceptors (type org.apache.hc.client5.http.classic.ExecChainHandler) added on a http client. This is e.g. useful for fetching a token to add it as a header on a requests. The requests done in such an interceptor are not instrumented because of this if. Would it be possible to fix this, so that traces do not miss http calls?

Expected Behavior

All http calls are recorded in the trace, even when they are executed from within an interceptor.

Reproduction Code
        try(CloseableHttpClient httpClient = HttpClientBuilder.create()
                .addExecInterceptorLast("interceptor", (request, scope, chain) -> {
                    CloseableHttpClient tokenHttpClient = HttpClientBuilder.create().build();
                    String token = tokenHttpClient.execute(new HttpGet("..."), resp -> {
                        // ...
                        return fetchedToken;
                    });
                    request.addHeader("x-token", token);
                    return chain.proceed(request, scope);
                })
                .build()) {
            httpClient.execute(new HttpGet("..."), response -> {
                // ...
                return null;
            });
        }
Ngôn ngữ chính
Java
Star
737
Fork
361
Merge trung bình
3 ngày 20 giờ
Pull request đã merge (30 ngày)
173

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DataDog/dd-trace-java

Tất cả issue của DataDog/dd-trace-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.