Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 17, 2026

Removes all deprecated methods from HTTP client and server library instrumentation modules as part of API cleanup.

Changes

HTTP Client Libraries

  • java-http-client: Removed newHttpClient() (replaced by wrap())
  • apache-httpclient 4.3/5.2: Removed newHttpClient() and newHttpClientBuilder() (replaced by createHttpClient() and createHttpClientBuilder())
  • jetty-httpclient 9.2/12.0: Removed getHttpClient() getter and deprecated builder setters setHttpClientTransport() and setSslContextFactory()
  • okhttp-3.0: Removed newCallFactory() (replaced by createCallFactory())

HTTP Server Libraries

  • java-http-server: Removed newFilter() (replaced by createFilter())

Code Cleanup

  • Removed unused httpClient fields and builder parameters in JettyClientTelemetry classes
  • Deleted deprecated test classes: JettyHttpClient12LibraryDeprecatedApiTest and JettyHttpClient9LibraryDeprecatedApiTest
  • Cleaned up unused imports

Migration Example

// Before (deprecated)
JavaHttpClientTelemetry telemetry = JavaHttpClientTelemetry.create(openTelemetry);
HttpClient client = telemetry.newHttpClient(HttpClient.newHttpClient());

// After
JavaHttpClientTelemetry telemetry = JavaHttpClientTelemetry.create(openTelemetry);
HttpClient client = telemetry.wrap(HttpClient.newHttpClient());

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • develocity.opentelemetry.io
    • Triggering command: /usr/lib/jvm/temurin-21-jdk-amd64/bin/java /usr/lib/jvm/temurin-21-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)
  • scans-in.gradle.com
    • Triggering command: /usr/lib/jvm/temurin-21-jdk-amd64/bin/java /usr/lib/jvm/temurin-21-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

remove all deprecated methods from HTTP client and server library instrumentation modules


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Remove all deprecated methods from HTTP client and server library Remove deprecated methods from HTTP client and server library instrumentation modules Jan 17, 2026
Copilot AI requested a review from trask January 17, 2026 03:11
@trask trask marked this pull request as ready for review January 17, 2026 03:51
@trask trask requested a review from a team as a code owner January 17, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants