Skip to content

Commit

Permalink
Merge pull request #1666 from Netflix/lindseyr/add-metrics
Browse files Browse the repository at this point in the history
Add metrics for h2 frames passed through userEventTriggered
  • Loading branch information
lindseyreynolds authored Oct 23, 2023
2 parents bb6152d + b12ba64 commit bf54e68
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
}
}

@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
try {
if (evt instanceof Http2Frame) {
incrementCounter(registry, frameCounterName, metricId, (Http2Frame) evt);
}
} finally {
super.userEventTriggered(ctx, evt);
}
}

@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
try {
Expand Down

0 comments on commit bf54e68

Please sign in to comment.