-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quic: add quic version counters in http3 codec stats. #16943
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,7 +158,8 @@ void QuicFilterManagerConnectionImpl::maybeApplyDelayClosePolicy() { | |
} | ||
|
||
void QuicFilterManagerConnectionImpl::onConnectionCloseEvent( | ||
const quic::QuicConnectionCloseFrame& frame, quic::ConnectionCloseSource source) { | ||
const quic::QuicConnectionCloseFrame& frame, quic::ConnectionCloseSource source, | ||
quic::QuicTransportVersion version) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general I'd prefer to plumb ParsedQuicVersion instead of QuicTransportVersion. We currently have a 1:1 mapping but that wasn't always the case and won't necessarily stay that way. |
||
transport_failure_reason_ = absl::StrCat(quic::QuicErrorCodeToString(frame.quic_error_code), | ||
" with details: ", frame.error_details); | ||
if (network_connection_ != nullptr) { | ||
|
@@ -169,6 +170,34 @@ void QuicFilterManagerConnectionImpl::onConnectionCloseEvent( | |
ASSERT(network_connection_ != nullptr); | ||
network_connection_ = nullptr; | ||
} | ||
|
||
if (!codec_stats_.has_value()) { | ||
// The connection is closed before it can be used. stats are not recorded. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: -> was closed before it could be used |
||
return; | ||
} | ||
switch (version) { | ||
case quic::QUIC_VERSION_43: | ||
codec_stats_->quic_version_43_.inc(); | ||
return; | ||
case quic::QUIC_VERSION_46: | ||
codec_stats_->quic_version_46_.inc(); | ||
return; | ||
case quic::QUIC_VERSION_50: | ||
codec_stats_->quic_version_50_.inc(); | ||
return; | ||
case quic::QUIC_VERSION_51: | ||
std::cout << "logging" << std::endl; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clean up? |
||
codec_stats_->quic_version_51_.inc(); | ||
return; | ||
case quic::QUIC_VERSION_IETF_DRAFT_29: | ||
codec_stats_->quic_version_h3_29_.inc(); | ||
return; | ||
case quic::QUIC_VERSION_IETF_RFC_V1: | ||
codec_stats_->quic_version_rfc_v1_.inc(); | ||
return; | ||
default: | ||
return; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we make sure we have unit tests for all of these for coverage? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. I added a new EnvoyClientSessionAllQuicVersionTest for this since none of the existing tests cover all QUIC versions. |
||
} | ||
} | ||
|
||
void QuicFilterManagerConnectionImpl::closeConnectionImmediately() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, we have a general Envoy policy that stats don't get removed, but I think it makes sense that as we remove versions of HTTP/3 that we can remove the stats as they'd be implicitly 0 forevermore.
I think this is OK but I want to run this by @envoyproxy/senior-maintainers for second opinion. Alternately we can not add stats for the versions which are going away, but it'd be annoying between now and Q4 when we remove support for outdated versions.
Second, AFIK (@DavidSchinazi) we plan to remove support for non-H3 QUIC this fall as IETF-quic becomes the standard. I think we should make this EoL clear here now (even through QUIC is in alpha and has no guarantees) as part of bubbling up data on which versions are supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify the plan from the QUIC side of things:
I'd suggest only supporting h3/RFCv1 when QUIC leaves Alpha in Envoy, as that's the only version we'll support long-term.
I think we have two options:
I'd personally lean towards option 1 if that's acceptable to Envoy, but if that's not an option then I'd suggest option 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'd lean towards 1 as well, I just want a thumbs up from a non-googler as a double check. I think if we comment that the stat will be going away as support is removed by EoY that makes it clear for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer 1 as well. I want to be able to monitor the QUIC version deprecation process in Envoy as well.
Happy to add more notes in this doc if Envoy maintainers agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hear no objections so let's just go for it :-P