apache httpclient 5 - http calls done in interceptors not instrumented
@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ả
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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DataDog/dd-trace-java
-
type: feature request
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 70/100
DataDog/dd-trace-java#10245 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 62/100
DataDog/dd-trace-java#12608 ·
-
type: bug report
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
DataDog/dd-trace-java#12597 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
DataDog/dd-trace-java#12540 · 4 bình luận · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
DataDog/dd-trace-java#12480 ·
Tất cả issue của DataDog/dd-trace-java
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
inu-appcenter/memorIN-backend#288 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
frontend maui-pilot pilot-ask question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Đang mởarea/plugin
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
kestra-io/plugin-kestra#190 ·