protected static void incrementExceptionCounter(Throwable throwable, String handler) { registry.counter("server.connection.exception", "handler", handler, "id", throwable.getClass().getSimpleName()) .increment(); }
protected static void incrementExceptionCounter(Throwable throwable) { registry.counter("server.connection.exception", "handler", "Http2ConnectionCloseHandler", "id", throwable.getClass().getSimpleName()) .increment(); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { //super.exceptionCaught(ctx, cause); errorCounter.increment(); final String mesg = "Exception on Origin channel for origin - " + originName + ". " + ChannelUtils.channelInfoForLogging(ctx.channel()) + " - " + cause.getClass().getCanonicalName() + ": " + cause.getMessage(); closeConnection(ctx, mesg); if (LOG.isDebugEnabled()) { LOG.debug(mesg, cause); } }
public ChannelFuture close() { final ServerStats stats = getServerStats(); stats.decrementOpenConnectionsCount(); closeConnCounter.increment(); return channel.close(); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { //super.channelInactive(ctx); inactiveCounter.increment(); final String msg = "Client channel for origin - " + originName + " - inactive event has fired. " + ChannelUtils.channelInfoForLogging(ctx.channel()); closeConnection(ctx, msg); }
@Override public void incrementConcurrency() throws ZuulFilterConcurrencyExceededException { final int limit = filterConcurrencyLimit.get(); if ((concurrencyProtectEnabled.get()) && (concurrentCount.get() >= limit)) { concurrencyRejections.increment(); throw new ZuulFilterConcurrencyExceededException(this, limit); } concurrentCount.incrementAndGet(); }
protected static void incrementErrorCounter(Registry registry, String counterName, String metricId, Http2Exception h2e) { String h2Error = h2e.error() != null ? h2e.error().name() : "NA"; String exceptionName = h2e.getClass().getSimpleName(); registry.counter(counterName, "id", metricId, "error", h2Error, "exception", exceptionName) .increment(); }
@Override public void preRequestChecks(HttpRequestMessage zuulRequest) { if (concurrencyProtectionEnabled.get() && concurrentRequests.get() > concurrencyMax.get()) { rejectedRequests.increment(); throw new OriginConcurrencyExceededException(getName()); } concurrentRequests.incrementAndGet(); }
private void repopulateRetryBody() { // if SSL origin request body is cached and has been cleared by Netty SslHandler, set it from cache // note: it's not null but is empty because the content chunks exist but the actual readable bytes are 0 if (sslRetryBodyCache != null && attemptNum > 1 && zuulRequest.getBody() != null && zuulRequest.getBody().length == 0) { zuulRequest.setBody(sslRetryBodyCache); populatedSslRetryBody.increment(); } }
protected static void incrementExceptionCounter(Throwable throwable, String handler) { registry.counter("server.connection.exception", "handler", handler, "id", throwable.getClass().getSimpleName()) .increment(); }
protected static void incrementExceptionCounter(Throwable throwable) { registry.counter("server.connection.exception", "handler", "Http2ConnectionCloseHandler", "id", throwable.getClass().getSimpleName()) .increment(); }
@Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { if (evt instanceof HttpServerLifecycleChannelHandler.StartEvent) { incrementCurrentRequestsInFlight(ctx); } else if (evt instanceof HttpServerLifecycleChannelHandler.CompleteEvent) { decrementCurrentRequestsIfOneInflight(ctx); } else if (evt instanceof HttpLifecycleChannelHandler.RejectedPipeliningEvent) { unSupportedPipeliningCounter.increment(); } super.userEventTriggered(ctx, evt); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { //super.exceptionCaught(ctx, cause); errorCounter.increment(); final String mesg = "Exception on Origin channel for origin - " + originName + ". " + ChannelUtils.channelInfoForLogging(ctx.channel()) + " - " + cause.getClass().getCanonicalName() + ": " + cause.getMessage(); closeConnection(ctx, mesg); if (LOG.isDebugEnabled()) { LOG.debug(mesg, cause); } }
public ChannelFuture close() { final ServerStats stats = getServerStats(); stats.decrementOpenConnectionsCount(); closeConnCounter.increment(); return channel.close(); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { //super.channelInactive(ctx); inactiveCounter.increment(); final String msg = "Client channel for origin - " + originName + " - inactive event has fired. " + ChannelUtils.channelInfoForLogging(ctx.channel()); closeConnection(ctx, msg); }
@Override public void incrementConcurrency() throws ZuulFilterConcurrencyExceededException { final int limit = filterConcurrencyLimit.get(); if ((concurrencyProtectEnabled.get()) && (concurrentCount.get() >= limit)) { concurrencyRejections.increment(); throw new ZuulFilterConcurrencyExceededException(this, limit); } concurrentCount.incrementAndGet(); }
protected static void incrementErrorCounter(Registry registry, String counterName, String metricId, Http2Exception h2e) { String h2Error = h2e.error() != null ? h2e.error().name() : "NA"; String exceptionName = h2e.getClass().getSimpleName(); registry.counter(counterName, "id", metricId, "error", h2Error, "exception", exceptionName) .increment(); }
@Override public void preRequestChecks(HttpRequestMessage zuulRequest) { if (concurrencyProtectionEnabled.get() && concurrentRequests.get() > concurrencyMax.get()) { rejectedRequests.increment(); throw new OriginConcurrencyExceededException(getName()); } concurrentRequests.incrementAndGet(); }
private void repopulateRetryBody() { // if SSL origin request body is cached and has been cleared by Netty SslHandler, set it from cache // note: it's not null but is empty because the content chunks exist but the actual readable bytes are 0 if (sslRetryBodyCache != null && attemptNum > 1 && zuulRequest.getBody() != null && zuulRequest.getBody().length == 0) { zuulRequest.setBody(sslRetryBodyCache); populatedSslRetryBody.increment(); } }
@Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { if (evt instanceof HttpServerLifecycleChannelHandler.StartEvent) { incrementCurrentRequestsInFlight(ctx); } else if (evt instanceof HttpServerLifecycleChannelHandler.CompleteEvent) { decrementCurrentRequestsIfOneInflight(ctx); } else if (evt instanceof HttpLifecycleChannelHandler.RejectedPipeliningEvent) { unSupportedPipeliningCounter.increment(); } super.userEventTriggered(ctx, evt); }