File tree Expand file tree Collapse file tree
dd-java-agent/instrumentation/netty/netty-4.1/src/main/java/datadog/trace/instrumentation/netty41 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import org .slf4j .LoggerFactory ;
1010
1111public class NettyHttp2Helper {
12- private static final Class HTTP2_CODEC_CLS ;
13- private static final Class HTTP2_FRAME_CODEC_CLS ;
12+ private static final Class HTTP2_STREAM_FRAME_CODEC_CLS ;
13+ private static final Class HTTP2_CONNECTION_CODEC_CLS ;
1414 private static final MethodHandle IS_SERVER_FIELD ;
1515 private static final Logger LOGGER = LoggerFactory .getLogger (NettyHttp2Helper .class );
1616
@@ -54,17 +54,17 @@ public class NettyHttp2Helper {
5454 frameCodecClass = null ;
5555 LOGGER .debug ("Unable to setup netty http2 connection detection" , t );
5656 }
57- HTTP2_CODEC_CLS = codecClass ;
58- HTTP2_FRAME_CODEC_CLS = frameCodecClass ;
57+ HTTP2_STREAM_FRAME_CODEC_CLS = codecClass ;
58+ HTTP2_CONNECTION_CODEC_CLS = frameCodecClass ;
5959 IS_SERVER_FIELD = isServerField ;
6060 }
6161
6262 public static boolean isHttp2FrameCodec (final ChannelHandler handler ) {
63- return HTTP2_CODEC_CLS != null && HTTP2_CODEC_CLS .isInstance (handler );
63+ return HTTP2_STREAM_FRAME_CODEC_CLS != null && HTTP2_STREAM_FRAME_CODEC_CLS .isInstance (handler );
6464 }
6565
6666 public static boolean isHttp2ConnectionCodec (final ChannelHandler handler ) {
67- return HTTP2_FRAME_CODEC_CLS != null && HTTP2_FRAME_CODEC_CLS .isInstance (handler );
67+ return HTTP2_CONNECTION_CODEC_CLS != null && HTTP2_CONNECTION_CODEC_CLS .isInstance (handler );
6868 }
6969
7070 public static boolean isServer (final ChannelHandler handler ) {
You can’t perform that action at this time.
0 commit comments