Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

apache httpclient 5 - http calls done in interceptors not instrumented

オープン
#10,383 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@vandonr がすでに取り組んでいます。

2026年2月17日 から。

評価

この issue はまだ評価されていません。

説明

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;
            });
        }
主要言語
Java
スター
736
フォーク
364
平均マージ
3日 13時間
マージ済み PR(30日)
213

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DataDog/dd-trace-java のほかの issue

DataDog/dd-trace-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。