Class MetricsRequestHandler


  • @ApplicationScoped
    public class MetricsRequestHandler
    extends Object
    • Constructor Detail

      • MetricsRequestHandler

        public MetricsRequestHandler()
    • Method Detail

      • handleRequest

        public void handleRequest​(String requestPath,
                                  String method,
                                  Stream<String> acceptHeaders,
                                  Map<String,​String[]> parameterMap,
                                  MetricsRequestHandler.Responder responder)
                           throws IOException
        Parameters:
        requestPath - e.g. request.getRequestURI for an HttpServlet
        method - http method (GET, POST, etc)
        acceptHeaders - accepted content types
        parameterMap - Map containing query parameters and values
        responder - a method that returns a response to the caller. See MetricsRequestHandler.Responder
        Throws:
        IOException - rethrows IOException if thrown by the responder You can find example usage in the tests, in io.smallrye.metrics.tck.rest.MetricsHttpServlet
      • handleRequest

        public void handleRequest​(String requestPath,
                                  String contextRoot,
                                  String method,
                                  Stream<String> acceptHeaders,
                                  Map<String,​String[]> parameterMap,
                                  MetricsRequestHandler.Responder responder)
                           throws IOException
        Parameters:
        requestPath - e.g. request.getRequestURI for an HttpServlet
        contextRoot - the root at which Metrics are exposed, usually "/metrics"
        method - http method (GET, POST, etc)
        acceptHeaders - accepted content types
        parameterMap - Map containing query parameters and values
        responder - a method that returns a response to the caller. See MetricsRequestHandler.Responder
        Throws:
        IOException - rethrows IOException if thrown by the responder You can find example usage in the tests, in io.smallrye.metrics.tck.rest.MetricsHttpServlet