public ServerChannelMetrics(String id) { super(); String metricNamePrefix = "server.connections."; currentConnectionsGauge = new BasicGauge<>(MonitorConfig.builder(metricNamePrefix + "current").withTag("id", id).build(), () -> currentConnections.get() ); DefaultMonitorRegistry.getInstance().register(currentConnectionsGauge); totalConnections = createCounter(metricNamePrefix + "connect", id); connectionErrors = createCounter(metricNamePrefix + "errors", id); connectionClosed = createCounter(metricNamePrefix + "close", id); connectionIdleTimeout = createCounter(metricNamePrefix + "idle.timeout", id); connectionThrottled = createCounter(metricNamePrefix + "throttled", id); }
+ ", current-server-conns = " + ServerChannelMetrics.currentConnectionCountFromChannel(channel) + ", current-http-reqs = " + HttpMetricsChannelHandler.getInflightRequestCountFromChannel(channel) + ", status = " + (response == null ? getRequestId(channel, ctx) : response.getStatus())
this.channelMetrics = new ServerChannelMetrics("http-" + port); this.registry = channelDependencies.get(ZuulDependencyKeys.registry); this.httpMetricsHandler = new HttpMetricsChannelHandler(registry, "server", "http-" + port);
this.channelMetrics = new ServerChannelMetrics("http-" + port); this.registry = channelDependencies.get(ZuulDependencyKeys.registry); this.httpMetricsHandler = new HttpMetricsChannelHandler(registry, "server", "http-" + port);
public ServerChannelMetrics(String id) { super(); String metricNamePrefix = "server.connections."; currentConnectionsGauge = new BasicGauge<>(MonitorConfig.builder(metricNamePrefix + "current").withTag("id", id).build(), () -> currentConnections.get() ); DefaultMonitorRegistry.getInstance().register(currentConnectionsGauge); totalConnections = createCounter(metricNamePrefix + "connect", id); connectionErrors = createCounter(metricNamePrefix + "errors", id); connectionClosed = createCounter(metricNamePrefix + "close", id); connectionIdleTimeout = createCounter(metricNamePrefix + "idle.timeout", id); connectionThrottled = createCounter(metricNamePrefix + "throttled", id); }
this.channelMetrics = new ServerChannelMetrics("http-" + port); this.registry = channelDependencies.get(ZuulDependencyKeys.registry); this.httpMetricsHandler = new HttpMetricsChannelHandler(registry, "server", "http-" + port);
+ ", current-server-conns = " + ServerChannelMetrics.currentConnectionCountFromChannel(channel) + ", current-http-reqs = " + HttpMetricsChannelHandler.getInflightRequestCountFromChannel(channel) + ", status = " + (response == null ? getRequestId(channel, ctx) : response.getStatus())
public ServerChannelMetrics(String id) { super(); String metricNamePrefix = "server.connections."; currentConnectionsGauge = new BasicGauge<>(MonitorConfig.builder(metricNamePrefix + "current").withTag("id", id).build(), () -> currentConnections.get() ); DefaultMonitorRegistry.getInstance().register(currentConnectionsGauge); totalConnections = createCounter(metricNamePrefix + "connect", id); connectionErrors = createCounter(metricNamePrefix + "errors", id); connectionClosed = createCounter(metricNamePrefix + "close", id); connectionIdleTimeout = createCounter(metricNamePrefix + "idle.timeout", id); connectionThrottled = createCounter(metricNamePrefix + "throttled", id); }
+ ", current-server-conns = " + ServerChannelMetrics.currentConnectionCountFromChannel(channel) + ", current-http-reqs = " + HttpMetricsChannelHandler.getInflightRequestCountFromChannel(channel) + ", status = " + (response == null ? getRequestId(channel, ctx) : response.getStatus())