Class HttpRequestAndChannel
java.lang.Object
io.opentelemetry.instrumentation.netty.v4.common.HttpRequestAndChannel
A tuple of an
HttpRequest and a Channel.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract io.netty.channel.Channelchannel()Returns theChannel.static HttpRequestAndChannelcreate(io.netty.handler.codec.http.HttpRequest request, io.netty.channel.Channel channel) Create a newHttpRequestAndChannel.abstract SocketAddressReturn theChannel.remoteAddress()present when thisHttpRequestAndChannelwas created.abstract io.netty.handler.codec.http.HttpRequestrequest()Returns theHttpRequest.
-
Constructor Details
-
HttpRequestAndChannel
public HttpRequestAndChannel()
-
-
Method Details
-
create
public static HttpRequestAndChannel create(io.netty.handler.codec.http.HttpRequest request, io.netty.channel.Channel channel) Create a newHttpRequestAndChannel. -
request
public abstract io.netty.handler.codec.http.HttpRequest request()Returns theHttpRequest. -
channel
public abstract io.netty.channel.Channel channel()Returns theChannel. -
remoteAddress
Return theChannel.remoteAddress()present when thisHttpRequestAndChannelwas created.We capture the remote address early because netty may return null when calling
Channel.remoteAddress()at the end of processing in cases of timeouts or other connection issues.
-