Skip to content

Add ProcessInfoContributor #38371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jonatan-ivanov
Copy link
Member

This InfoContributor exposes information about the process of the application through actuator's info endpoint as part of the Enhanced Observability effort: #25476

When configured, it looks like this:

"process": {
    "pid": 91379,
    "parentPid": 42323,
    "owner": "jonatan",
    "cpus": 16
}

The feature can be enabled by setting: management.info.process.enabled=true.

Next to the cpu I would also like to add memory (heap) information so that users can see what is the max heap size the jvm can use and what is the total heap size right now (can be interesting in a containerized environment just like the cpu count) but maybe in another PR since that can raise more questions/might need more feedback.

Also, there might be an issue with the current implementation. ProcessInfo assumes that pid, parentPid and owner will not change throughout the application lifecycle which is a fair assumption except if you do checkpoint and restore (crac).

This InfoContributor exposes information about
the process of the application.
@jonatan-ivanov jonatan-ivanov mentioned this pull request Nov 16, 2023
15 tasks
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 16, 2023
@mhalbritter mhalbritter added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 10, 2024
@mhalbritter mhalbritter added this to the 3.3.x milestone Jan 10, 2024
@mhalbritter mhalbritter self-assigned this Jan 10, 2024
mhalbritter pushed a commit that referenced this pull request Jan 10, 2024
This InfoContributor exposes information about
the process of the application.

See gh-38371
@mhalbritter mhalbritter modified the milestones: 3.3.x, 3.3.0-M1 Jan 10, 2024
@mhalbritter
Copy link
Contributor

Thanks Jonatan!

@jonatan-ivanov jonatan-ivanov deleted the process-info branch January 17, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants