Collect timings related with TLS handshake
Motivation:
Collect the timings related with TLS handshake. If a request was the first in a connection, armeria could also provide it in a RequestLog to tell a user that the request timing has been affected by TLS handshake.
Modifications:
- Add TLS handshake related field in
ClientConnectionTimings - Add TLS handshake duration metric field at MetricCollectingClient
- Start collecting the TLS handshake timer in the case below.
- ~~If the client is enabled as
TCP fast openin the first request, start the timer before the TCP connection.~~ - start the timer when netty calls
SslHandler.channelActive()
- ~~If the client is enabled as
Result:
- Closes #3647
๐ Build Scanยฎ (commit: 43eca15c25c2fff78d9332fe8db980cc588eb893)
| Job name | Status | Build Scanยฎ |
|---|---|---|
| build-windows-latest-jdk-19 | โ | https://ge.armeria.dev/s/ch7tpdqlqmh6u |
| build-self-hosted-unsafe-jdk-8 | โ | https://ge.armeria.dev/s/pxczxoqz7shf6 |
| build-self-hosted-unsafe-jdk-19-snapshot-blockhound | โ | https://ge.armeria.dev/s/l6pwhyqgjf5ku |
| build-self-hosted-unsafe-jdk-17-min-java-17-coverage | โ | https://ge.armeria.dev/s/nfk24356rofpu |
| build-self-hosted-unsafe-jdk-17-min-java-11 | โ | https://ge.armeria.dev/s/m63yyh7w2rvrq |
| build-self-hosted-unsafe-jdk-17-leak | โ | https://ge.armeria.dev/s/ivmsuqx7uzfpm |
| build-self-hosted-unsafe-jdk-11 | โ | https://ge.armeria.dev/s/lcplfewunk2as |
| build-macos-12-jdk-19 | โ | https://ge.armeria.dev/s/756u4aui7sdee |
Additionally, shouldn't the check condition at the bottom be >0 instead of >=0??
- https://github.com/line/armeria/blob/3033fea128169e0bfeb52f8486730b743e371f9c/core/src/main/java/com/linecorp/armeria/common/logging/ClientConnectionTimingsBuilder.java#L84
- https://github.com/line/armeria/blob/3033fea128169e0bfeb52f8486730b743e371f9c/core/src/main/java/com/linecorp/armeria/common/logging/ClientConnectionTimingsBuilder.java#L135
Additionally, shouldn't the check condition at the bottom be >0 instead of >=0??
Oops, I think so. ๐
Oops, I think so. ๐
If find a bug while working on a different issue like this, should I make and work on a separate issue ticket or fix it together in this PR?
should I make and work on a separate issue ticket or fix it together in this PR?
It's your choice, but I prefer that it be handled separately
It's your choice, but I prefer that it be handled separately
Okay, I will make new issue and new PR!!
Great job, @Leewongi0731! ๐