Skip to content

Enabling HTTP/3.0 detection for Prober Extender (QUIC)#1425

Merged
jesusvazquez merged 17 commits into
prometheus:masterfrom
sebastianfeliciano:sfeliciano-traffic-4464-quic-detection
Jul 16, 2025
Merged

Enabling HTTP/3.0 detection for Prober Extender (QUIC)#1425
jesusvazquez merged 17 commits into
prometheus:masterfrom
sebastianfeliciano:sfeliciano-traffic-4464-quic-detection

Conversation

@sebastianfeliciano
Copy link
Copy Markdown
Contributor

@sebastianfeliciano sebastianfeliciano commented Jun 10, 2025

Summary

Fixes: #1418

We need monitoring capabilities to validate QUIC endpoints and H3.
We use quic-go library

Preview:

Monitor HTTP/3 endpoints with the same reliability as HTTP/1.x and HTTP/2.

No fallback to h2 if h3 is not found

Testing

local host

Revert Plan

revert

@sebastianfeliciano sebastianfeliciano force-pushed the sfeliciano-traffic-4464-quic-detection branch 2 times, most recently from da5c3f9 to 0b9f7b5 Compare June 10, 2025 17:22
@sebastianfeliciano
Copy link
Copy Markdown
Contributor Author

@electron0zero

@zhengxiongzhao
Copy link
Copy Markdown

When the certificate expires
handler.go:194 Error for HTTP request CRYPTO_ERROR 0x12a (local): tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2025-06-23T11:32:17+08:00 is after 2025-06-22T02:06:45Z

@sebastianfeliciano
Copy link
Copy Markdown
Contributor Author

sebastianfeliciano commented Jun 23, 2025

When the certificate expires handler.go:194 Error for HTTP request CRYPTO_ERROR 0x12a (local): tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2025-06-23T11:32:17+08:00 is after 2025-06-22T02:06:45Z

@zhengxiongzhao in the Go crypto/tls package, tls.Config.ServerName must not be empty, Based on this issue, I've moved logic to handle this. Please note this does not have a fallback method where h3 goes to h2. If there's something else please let me know.

@sebastianfeliciano
Copy link
Copy Markdown
Contributor Author

@bwplotka could I get a review?

@zhengxiongzhao
Copy link
Copy Markdown

When the certificate expires handler.go:194 Error for HTTP request CRYPTO_ERROR 0x12a (local): tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2025-06-23T11:32:17+08:00 is after 2025-06-22T02:06:45Z

@zhengxiongzhao in the Go crypto/tls package, tls.Config.ServerName must not be empty, Based on this issue, I've moved logic to handle this. Please note this does not have a fallback method where h3 goes to h2. If there's something else please let me know.

ok. thank you for your answer. I will give it a try

@sebastianfeliciano
Copy link
Copy Markdown
Contributor Author

@SuperQ can I get a review?

Copy link
Copy Markdown
Member

@jesusvazquez jesusvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is looking great. Left a small nit about a logline that perhaps was a leftover?

I think we're missing some tests to gain a bit of confidence with this.

  • TestValidHTTPVersion should now perhaps include HTTP/3
  • We need a test for probing against an endpoint using the new code.

Comment thread prober/http.go Outdated
@sebastianfeliciano sebastianfeliciano force-pushed the sfeliciano-traffic-4464-quic-detection branch from c17e092 to 585dd54 Compare July 7, 2025 08:10
@sebastianfeliciano
Copy link
Copy Markdown
Contributor Author

The code is looking great. Left a small nit about a logline that perhaps was a leftover?

  • TestValidHTTPVersion should now perhaps include HTTP/3

So TestValidHTTPVersion uses a H1.1 and H2 server over TCP. The structure of the test is starting with the server with 1.1, it can connect to 2. Without 1.1 it cannot connect to H2 because it is an H1.1 server.

With that being said, this is done over TCP so TestValidHTTP should not work for H3, I've added a false case, but added a whole new ValidHTTPVersionsQUIC since this is over UDP and does not fallback using TCP.

Comment thread Dockerfile Outdated
Comment thread blackbox.yml
Comment thread prober/http.go
Comment thread prober/http.go Outdated
Comment thread prober/http_test.go
Comment thread prober/http_test.go
Comment thread prober/http_test.go Outdated
Comment thread prober/http_test.go Outdated
…eses. Making the request via QUIC but is not supported in hosts.

Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
…ects

Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
…l http3 server for tests, assign warn log reformatting

Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
@sebastianfeliciano sebastianfeliciano force-pushed the sfeliciano-traffic-4464-quic-detection branch from 6cd765f to 23ce5d4 Compare July 8, 2025 01:03
…rent HTTP configurations

Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
@sebastianfeliciano
Copy link
Copy Markdown
Contributor Author

sebastianfeliciano commented Jul 8, 2025

@electron0zero, thank you for your help! Just to note, Ive added config checking within the ValidHTTPVersions in additon to config.go, so that others do not get confused on why HTTP3 should not work for the TCP Version (With 1.1 and 2.0) and vice-versa. This is because the Test is called on probe and in main it Reloads a config first, i added the validation inside of the tests, and referenced the file.

Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Comment thread prober/http_test.go Outdated
Comment thread config/config.go
Comment thread config/testdata/invalid-no-versions-http3-enabled.yml Outdated
Comment thread blackbox.yml Outdated
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Signed-off-by: Sebastian Feliciano <sfeliciano@slack-corp.com>
Copy link
Copy Markdown
Member

@jesusvazquez jesusvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now looking good to me, awesome work 💪 .

Waiting for @electron0zero's review before merge

Copy link
Copy Markdown
Member

@electron0zero electron0zero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, great work 👏🏼

@electron0zero electron0zero requested review from SuperQ and mem July 10, 2025 09:15
@electron0zero
Copy link
Copy Markdown
Member

I am giving time to other maintainers to review before we merge, if there's nothing in a week, I will hit merge.

feel free to remind me if I don't get to it after a week.

@sebastianfeliciano
Copy link
Copy Markdown
Contributor Author

@electron0zero, looks like there are no answers after a week 😮

@jesusvazquez jesusvazquez merged commit 2156dcc into prometheus:master Jul 16, 2025
5 checks passed
@jesusvazquez jesusvazquez mentioned this pull request Dec 4, 2025
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.

Supporting HTTP3 Extender Options - QUIC

4 participants