Arturo Bernal created JSPWIKI-1311:
--------------------------------------

             Summary: Add metrics, a health endpoint and structured logging for 
operators
                 Key: JSPWIKI-1311
                 URL: https://issues.apache.org/jira/browse/JSPWIKI-1311
             Project: JSPWiki
          Issue Type: New Feature
            Reporter: Arturo Bernal


JSPWiki gives operators little to observe a running instance with. What exists 
today is the following.

 

The package org.apache.wiki.management has only SimpleMBean, which is the base 
of the admin beans of the administration page (org.apache.wiki.ui.admin); it is 
not a metrics system. WatchDog notifies about timeouts of the threads it 
watches. I found no code for metrics or health checks, with Micrometer, 
Prometheus or anything else, in the code or in the poms, and no Jira issue 
about it.

 

Logging goes through Log4j 2, configured in WEB-INF/classes/log4j2.xml with a 
plain text PatternLayout for the console and for the rolling files, plus a 
separate audit log.

 

Proposal, in three independent parts that can be done one at a time.

 

Metrics, for example with Micrometer and exposed in the Prometheus format: 
pages and attachments, searches, logins and failed logins, the time of the page 
providers, the size of the caches and the state of the background threads.

 

A health endpoint that tells whether the engine has started and whether the 
page provider, the search index and the user database respond, for load 
balancers and container orchestrators. It must say nothing sensitive and be 
protected or limited as the deployment needs.

 

Structured logging: a JSON layout of Log4j 2 as an option, with the user and 
the request as context, and the audit log in the same format.

 

Open questions: which dependency to use (Micrometer, or only JMX and plain 
servlets), whether the endpoints belong in a servlet of the war or in a 
separate module, how to secure them, and what to do with the old JMX-style 
admin beans.

 

This ticket is a proposal; there is no implementation.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to