Class DebugResource

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable, BasicUniversalConfig, DefaultConfig, DefaultHtmlConfig

public class DebugResource extends BasicRestServlet
Microservice debug utilities.

This resource has no authentication of its own. Do not mount it where an untrusted caller can reach it without adding your own authentication.

The jetty-thread-dump navlink is a plain GET /jetty/dump, which shows the dump. Writing the dump to jetty-thread-dump.log needs a real POST /jetty/dump; a link can't reach it, because the router refuses any override of a GET to POST. Put the resource behind a CSRF boundary before mounting it anywhere a browser can reach.

See Also:

  • Constructor Details

  • Method Details

    • createJettyDump

      [POST /jetty/dump] - Generates and saves the jetty thread dump file to jetty-thread-dump.log.
      Parameters:
      req - The request.
      res - The response.
      Returns:
      The thread dump contents.
      Throws:
      Exception - Gets converted to 500 response.
    • getChildren

      [GET /] - Shows child utilities.
      Returns:
      Child utility links.
    • getJettyDump

      [GET /jetty/dump] - Generates and retrieves the jetty thread dump.
      Parameters:
      req - The request.
      res - The response.
      Returns:
      The thread dump contents.