dotCMS / dotCMS/core

[FEATURE] Thread Diagnostics APIs

Open
#35,192 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale Team : Modernization
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 JSON
  • GET /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.jsp lines 683–757 (getAllThreads, getSysInfo)
  • Target Class: MaintenanceResource.java (/api/v1/maintenance)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.