JMX Metrics for Regions
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 4.4k
- Forks
- 623
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem?
Paper allows for enabling JMX monitoring using the enable-jmx-monitoring flag. This is very helpful for setting up dashboards to externally view the performance of the server. However, in Folia, this has been disabled. These MBeans are still exposed, though, resulting in consistently empty or 0 values.
Describe the solution you'd like.
Since the existing metrics averageTickTime and tickTimes aren't helpful as global fields anymore, it would be neat to have data available for region information by editing net\minecraft\util\monitoring\jmx\MinecraftServerStatistics.java to include TabularData metrics, with a row for each region and columns for the region identifier, average tick rate, and also some other helpful things in folia-server\src\minecraft\java\io\papermc\paper\threadedregions\TickRegions$RegionStats like entityCount, playerCount, and chunkCount.
Describe alternatives you've considered.
Some plugins try to expose these things, but Folia's API currently doesn't support a lot of these types of metrics and since there's already some MBeans being exposed, I don't think it would be too messy to change what data the existing MBeans point to.
Other
No response
Contributor guide
No contributing guide indexed for this repository
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 net\minecraft\util\monitoring\jmx\MinecraftServerStatistics.java and the RegionStats definition in folia-server\src\minecraft\java\io\papermc\paper\threadedregions\TickRegions$RegionStats. Review the existing JMX metrics and the TabularData documentation, then determine how to expose one row per region with its identifier, average tick rate, entity count, player count, and chunk count. Done means the existing empty global metrics are replaced or redirected with useful regional MBean data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100