Skip to content

Add executor.delayed gauge for ForkJoinPool on Java 25+#7353

Merged
shakuzen merged 1 commit intomicrometer-metrics:mainfrom
kwondh5217:gh-6381
Apr 1, 2026
Merged

Add executor.delayed gauge for ForkJoinPool on Java 25+#7353
shakuzen merged 1 commit intomicrometer-metrics:mainfrom
kwondh5217:gh-6381

Conversation

@kwondh5217
Copy link
Copy Markdown
Contributor

@kwondh5217 kwondh5217 commented Mar 27, 2026

Summary

Closes #6381

  • Adds executor.delayed gauge for ForkJoinPool using getDelayedTaskCount() introduced in Java 25
  • The gauge is conditionally registered via reflection, so it remains compatible with Java versions before 25
  • Updates documentation to describe the new metric

@kwondh5217 kwondh5217 force-pushed the gh-6381 branch 3 times, most recently from 89920e4 to cd904e4 Compare March 27, 2026 03:28
reachvamsikrishnad-lgtm

This comment was marked as spam.

@shakuzen
Copy link
Copy Markdown
Member

@kwondh5217 Would you please rebase on or merge the latest main? I wonder if the build failures are because your changes are based on a version of main from before #7252 was merged.

Copy link
Copy Markdown
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me. Thanks!

ForkJoinPool.getDelayedTaskCount() was added in Java 25, enabling
monitoring of delayed (including periodic) tasks that are scheduled
but not yet ready for execution. The gauge is conditionally registered
via reflection so it remains compatible with Java versions before 25.

Closes micrometer-metricsgh-6381

Signed-off-by: Daeho Kwon <trewq231@naver.com>
@kwondh5217
Copy link
Copy Markdown
Contributor Author

Hi @shakuzen, I've rebased onto the latest main. However, it seems JvmGcMetricsTest#gcMetricsAvailableAfterGc is failing due to a timing issue unrelated to my changes. Could you re-trigger the CI? Thanks!

@kwondh5217 kwondh5217 requested a review from shakuzen March 31, 2026 13:34
@shakuzen shakuzen merged commit ccb3a68 into micrometer-metrics:main Apr 1, 2026
12 checks passed
@kwondh5217 kwondh5217 deleted the gh-6381 branch April 1, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add meter for ForkJoinPool#getDelayedTaskCount

3 participants