-
Notifications
You must be signed in to change notification settings - Fork 227
Add cgroup support (#831) #846
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
Conversation
💚 CLA has been signed |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Steps errors
Expand to view the steps failures
|
Test | Results |
---|---|
Failed | 0 |
Passed | 12135 |
Skipped | 8375 |
Total | 20510 |
@tanquetav sorry for letting this linger for so long! I took the liberty to change some variable/method names so they are more aligned with our code style, as well as adding some comments and a few more tests. I think we can merge this now, what do you think @basepi? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me!
💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
Let me check it out this weekend. I made some changes on java agent and let me assure the both logic are equals. |
@tanquetav Did you get a chance to review this again? |
Looking forward to have it being merged 🙏 |
I compared the code with the analogue code in the Java agent, and they seem to be functionally identical. I'll go ahead and merge this. |
The title of the PR is a little bit misleading. Please correct me if I'm wrong but as far as I understood this PR enables memory cgroup-based metrics (which is great!) but we still lack cgroup-based CPU metrics? If so I think it worth to file a separate issue to track the status. |
@drnextgis yes, the PR title doesn't reflect that this just about memory. In the changelog of 5.10.0, we noted that it's only about memory. Adding CPU metrics is planned, you can follow along here: elastic/apm#368 |
* Add cgroup support (elastic#831) * Fix search to cgroup directory, looking for where it is mounted * Fix None * Change metrics names * Round fix * adapted code style to pep8, added some comments and a couple more tests * use tighter exception handling, and removed a couple of unnecessary `return None` Co-authored-by: Benjamin Wohlwend <beni@elastic.co> Co-authored-by: Colton Myers <colton.myers@gmail.com>
What does this PR do?
closes #831
closes #876
Checklist
Author's Checklist
Related issues
Use cases
When a java program is running on a cgroup limited environment (docker with -m option, k8s with resource limit) cgroup is used to get memory information(system.memory.total, system.memory.actual.free and system.process.memory.rss)
Screenshots