public HttpBodySizeRecordingChannelHandler() { super(new InboundChannelHandler(), new OutboundChannelHandler()); }
public static Provider<Long> getCurrentRequestBodySize(Channel ch) { return new RequestBodySizeProvider(ch); }
@Override public void channelActive(ChannelHandlerContext ctx) throws Exception { groupMetrics.getForCurrentEventLoop().incrementCurrentConnections(); super.channelActive(ctx); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { try { super.channelInactive(ctx); } finally { groupMetrics.getForCurrentEventLoop().decrementCurrentConnections(); } } }
@Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { if (evt instanceof HttpLifecycleChannelHandler.StartEvent) { incrementCurrentRequestsInFlight(ctx); } else if (evt instanceof HttpLifecycleChannelHandler.CompleteEvent) { decrementCurrentRequestsIfOneInflight(ctx); } super.userEventTriggered(ctx, evt); }
public void incrementCurrentRequests() { int value = this.currentRequests.incrementAndGet(); updateGauge(currentRequestsId, value); }
public static Provider<Long> getCurrentResponseBodySize(Channel ch) { return new ResponseBodySizeProvider(ch); }
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { try { if (msg instanceof Http2Frame) { incrementCounter(registry, frameCounterName, metricId, (Http2Frame) msg); } } finally { super.channelRead(ctx, msg); } }
public HttpBodySizeRecordingChannelHandler() { super(new InboundChannelHandler(), new OutboundChannelHandler()); }
@Override public void channelActive(ChannelHandlerContext ctx) throws Exception { groupMetrics.getForCurrentEventLoop().incrementCurrentConnections(); super.channelActive(ctx); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { try { super.channelInactive(ctx); } finally { groupMetrics.getForCurrentEventLoop().decrementCurrentConnections(); } } }
@Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { if (evt instanceof HttpLifecycleChannelHandler.StartEvent) { incrementCurrentRequestsInFlight(ctx); } else if (evt instanceof HttpLifecycleChannelHandler.CompleteEvent) { decrementCurrentRequestsIfOneInflight(ctx); } super.userEventTriggered(ctx, evt); }
public void decrementCurrentRequests() { int value = this.currentRequests.decrementAndGet(); updateGauge(currentRequestsId, value); }
public static Provider<Long> getCurrentRequestBodySize(Channel ch) { return new RequestBodySizeProvider(ch); }
public static Provider<Long> getCurrentResponseBodySize(Channel ch) { return new ResponseBodySizeProvider(ch); }
@Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { super.write(ctx, msg, promise); if (msg instanceof Http2Frame) { incrementCounter(registry, frameCounterName, metricId, (Http2Frame) msg); } }
public void incrementCurrentConnections() { int value = this.currentConnections.incrementAndGet(); updateGauge(currentConnectionsId, value); }
public void decrementCurrentConnections() { int value = this.currentConnections.decrementAndGet(); updateGauge(currentConnectionsId, value); }