[FEATURE] Thread Diagnostics APIs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem
Thread diagnostics (full JVM thread dump with stack traces, lock info, deadlock detection, and system startup info) are currently only accessible via DWR calls to ThreadMonitorTool. The DWR returns an HTML-formatted <pre> string which limits filtering and search capabilities. Need REST endpoints to answer "What's happening inside the JVM?" with structured JSON data.
Goal
Provide REST endpoints for full thread dumps as structured JSON (enabling frontend filtering, search, deadlock highlighting) and lightweight system/thread count information.
APIs
GET /v1/maintenance/_threads— Full thread dump as structured JSONGET /v1/maintenance/_threads/info— System startup time and thread counts
Personas
- Developer Teams — Need REST APIs for Angular Threads tab
- System Administrators — Need to diagnose thread contention, deadlocks, and resource usage
Legacy Reference
- DWR Class:
com.dotcms.cmsmaintenance.ajax.ThreadMonitorTool - JSP:
view_cms_maintenance.jsplines 683–757 (getAllThreads, getSysInfo) - Target Class:
MaintenanceResource.java(/api/v1/maintenance)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with MaintenanceResource.java under /api/v1/maintenance, then compare the legacy ThreadMonitorTool DWR methods getAllThreads and getSysInfo in view_cms_maintenance.jsp lines 683–757. Implement the two listed REST endpoints with structured JSON for the full thread dump and system/thread counts; done means both APIs expose the diagnostics needed by the Angular Threads tab without the HTML-formatted DWR response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100