Skip to content

Commit

Permalink
add stats handler
Browse files Browse the repository at this point in the history
  • Loading branch information
anuvedverma committed Jul 3, 2024
1 parent 76f038b commit 7d60671
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.eclipse.jetty.server.SslConnectionFactory;
import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.server.handler.RequestLogHandler;
import org.eclipse.jetty.server.handler.StatisticsHandler;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.ssl.SslContextFactory;
Expand Down Expand Up @@ -107,9 +108,10 @@ private void setupContext(ProxyServerConfiguration config) {
HandlerCollection handlers = new HandlerCollection();

RequestLogHandler requestLogHandler = new RequestLogHandler();
StatisticsHandler statsHandler = new StatisticsHandler();
//possible not needed
//requestLogHandler.setRequestLog(customRequestLog);
handlers.setHandlers(new Handler[] { requestLogHandler, proxyConnectHandler });
handlers.setHandlers(new Handler[] { requestLogHandler, statsHandler, proxyConnectHandler });


this.server.setHandler(handlers);
Expand Down

0 comments on commit 7d60671

Please sign in to comment.