@Override
  public void channelInactive(ChannelHandlerContext ctx) throws Exception {
    logger.trace("Channel Inactive {}", ctx.channel().remoteAddress());
    metrics.connectionsDisconnectedCount.inc();
    openConnections.decrementAndGet();
    super.channelInactive(ctx);
  }
Handler that tracks connection establishment statistics.
ambry-rest/src/main/java/com/github/ambry/rest/ConnectionStatsHandler.java