Skip to content
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

Trace SSL handshakes in netty 4.0 #4635

Merged

Conversation

mateuszrzeszutek
Copy link
Member

Continuation of #4604

Copy link
Contributor

@iNikem iNikem left a comment

Choose a reason for hiding this comment

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

Have we already discussed having this as event as opposed to a span? Is there any separation between start/end for that span?

named("doConnect")
.and(takesArgument(0, SocketAddress.class))
.and(returns(named("io.netty.channel.ChannelFuture"))),
named("doConnect0")
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity - why this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

The doConnect actually traces more than just connection - it starts with tracing channel registration (which happens before) and ends after handler channelActive() has returned (which is way after SSL handshake is finished). The doConnect0 method seems to be doing just the connection, which is more accurate.

@mateuszrzeszutek
Copy link
Member Author

Have we already discussed having this as event as opposed to a span? Is there any separation between start/end for that span?

We've briefly touched upon this idea in the last PR, and we have #4617 where we can discuss it further. To sum up the previously mentioned points: SSL handshake takes time and has non-zero duration, and can fail - we can record the exception and set the span status.

@mateuszrzeszutek mateuszrzeszutek merged commit 7caa402 into open-telemetry:main Nov 16, 2021
@mateuszrzeszutek mateuszrzeszutek deleted the netty-4.0-ssl branch November 16, 2021 07:36
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
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.

None yet

2 participants