Better customization options for the underlying HTTP client
まだ誰も着手していません。
評価
調査の方向性
_DefaultConnectionContext と DefaultConnectionContext.builder のエントリポイントを読み、reactor-netty HttpClient がどのように組み立てられているかを理解します。提案されているメトリクスオプションを additionalHttpClientConfiguration フックと比較し、既存のクライアント構築テストを特定します。呼び出し元が完全な構築ロジックを置き換えずに基盤となるクライアントをカスタマイズできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
We're using the CF Java client under a fairly high load (tens of thousands of requests per day) and we would like to enable the metrics feature of reactor-netty, so that we can see how many connections are used at any point in time:
return createHttpClient().compress(true) // Code taken from _DefaultConnectionContext.java
.tcpConfiguration(this::configureTcpClient)
.secure(this::configureSsl)
.metrics(true, new CustomHttpClientMetricsRecorder());
This is currently not possible unless we also override the entire reactor-netty client via DefaultConnectionContext.builder().httpClient(...), which we don't want to do, because it would involve to copy-pasting the entire HttpClient building logic from _DefaultConnectionContext. I could make a pull request that allows users of the CF Java client to do:
DefaultConnectionContext.builder()
.metrics(true) // OR
.metrics(true, new CustomHttpClientMetricsRecorder())
.build();
But I also don't particularly like that idea, because this doesn't cover any future features that the rector-netty devs may implement (or already have implemented). Maybe something like the following would be best?
DefaultConnectionContext.builder()
.additionalHttpClientConfiguration(httpClient -> httpClient.metrics(true) // OR
.metrics(true, new CustomHttpClientMetricsRecorder()))
.build();
What do you think?
- 主要言語
- Java
- スター
- 334
- フォーク
- 319
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudfoundry/cf-java-client のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
cloudfoundry/cf-java-client#1374 ·
-
Integration tests fail: test-service-broker.jar incompatible with java-buildpack v5 (JDK 17 default) オープン
難易度 2/5 半日 初心者へのやさしさ 74/100
cloudfoundry/cf-java-client#1344 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
cloudfoundry/cf-java-client#1373 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
cloudfoundry/cf-java-client#1370 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
cloudfoundry/cf-java-client#1367 ·
cloudfoundry/cf-java-client の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
elastic/gradle-plugins#157 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cryptomator/hub#497 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
johanhaleby/occurrent#1120 ·