Skip to content

Enhance visibility of connection handshake process - #161

Merged
3dgiordano merged 4 commits into
developmentfrom
CONNECT-ATTEMPT-VISIBILITY
Aug 21, 2026
Merged

Enhance visibility of connection handshake process#161
3dgiordano merged 4 commits into
developmentfrom
CONNECT-ATTEMPT-VISIBILITY

Conversation

@3dgiordano

Copy link
Copy Markdown
Collaborator

This pull request introduces a mechanism to capture and report all connection attempts and their failures when establishing HTTP connections using Jetty, instead of only reporting the last failed attempt. This improves diagnostics for failed samples by attaching suppressed exceptions for each failed address, making connection issues more transparent in test results. The implementation involves a new ConnectAttemptRecorder class, integration of this recorder into all relevant HTTP client transports, and changes in the sampler to include these details in the error reporting.

The most important changes are:

Connection Failure Recording:

  • Added a new class ConnectAttemptRecorder that tracks all connection failures for each attempted address, and attaches them as suppressed exceptions to the main failure for improved error diagnostics. (src/main/java/com/blazemeter/jmeter/http2/core/ConnectAttemptRecorder.java)

Integration with HTTP Client Transports:

  • Introduced RecordingHttpClientTransportDynamic (a subclass of HttpClientTransportDynamic) and updated all HTTP client instantiations in HTTP2JettyClient to use this subclass, ensuring that every connection attempt is recorded. (src/main/java/com/blazemeter/jmeter/http2/core/HTTP2JettyClient.java) [1] [2] [3] [4] [5] [6]

  • Modified CustomHttpClientTransportOverHTTP2 to accept and leverage the ConnectAttemptRecorder, ensuring connection attempts are also tracked for HTTP/2 prior knowledge connections. (src/main/java/com/blazemeter/jmeter/http2/core/jetty/custom/http2/CustomHttpClientTransportOverHTTP2.java) [1] [2]

Sampler Error Reporting:

  • Updated HTTP2Sampler to call a new method attachConnectAttempts, which adds all recorded connection failures as suppressed exceptions to the thrown error, so they appear in the JMeter View Results Tree. (src/main/java/com/blazemeter/jmeter/http2/sampler/HTTP2Sampler.java)

API for Attaching Attempts:

  • Added a public method attachConnectAttempts to HTTP2JettyClient to expose the connection attempt recording for use by the sampler. (src/main/java/com/blazemeter/jmeter/http2/core/HTTP2JettyClient.java)

These changes collectively enhance the observability of connection issues by providing a complete picture of all attempted addresses and their respective failures during HTTP client operations.

@3dgiordano

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Co-authored-by: 3dgiordano <797057+3dgiordano@users.noreply.github.com>

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Resolved by merging development into this branch and fixing the conflict in HTTP2JettyClient in commit 4831c78.

@3dgiordano

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Copilot AI and others added 2 commits August 21, 2026 17:38
Co-authored-by: 3dgiordano <797057+3dgiordano@users.noreply.github.com>
Co-authored-by: 3dgiordano <797057+3dgiordano@users.noreply.github.com>

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Resolved by merging the latest development into this branch and fixing the conflicts in commit 8804dff.

@3dgiordano
3dgiordano merged commit 551523a into development Aug 21, 2026
2 checks passed
@3dgiordano
3dgiordano deleted the CONNECT-ATTEMPT-VISIBILITY branch August 21, 2026 18:00
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.

3 participants