code: @Override
      public void contextInitialized(ServletContextEvent event) {
          // Uncomment the next line to enable the default hotspot events.
          // DefaultExports.initialize();
  
          metrics = new Metrics();
          ServletContext context = event.getServletContext();
          context.addServlet("Metrics", new MetricsServlet()).addMapping("");
      }
docs: /* This should initialise the prometheus metrics when the
  server starts up instead of the first time /metrics is
  queried.