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
Use proc_events on Java processes #208
Conversation
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.
Looks good. I'll do a full CR once we restructure it ,let's make it an object instead of a set of functions, I think that's more managable.
@YishaiZinkin - let's move this code to https://github.com/Granulate/utils so it can be used by other components. I'll explain on Sunday. |
I suggest we finish the PR here just to concentrate the comments in one place. I'll move the module to |
# Conflicts: # gprofiler/profilers/java.py
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.
Very clean API 👍
Some small comments.
@YishaiZinkin can you merge from master? The other PR got merged |
# Conflicts: # gprofiler/profilers/java.py # requirements.txt
@@ -114,6 +115,23 @@ def get_ap_log(self) -> str: | |||
return self._ap_log | |||
|
|||
|
|||
class AsyncProfiledProcessMonitor: | |||
def __init__(self): | |||
self._attached_processes: List[int] = [] |
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.
You're now tracking processes both here and in JavaProfiler._profiled_processes
:(
Getting this error:
|
We're failing tests upon ERRORs in the log, but since this happens in another thread and it's not logged, it doesn't fail the tests :/ |
I pushed an update that merges this logic with #219 , as suggested in #219 (comment). |
It seems like this happens since we're running in a network namespace. |
6447740
to
99a1b59
Compare
Description
Use
proc_events
fromgranulate-utils
to track async-profiled processes and log when they exit with non-zero code.Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots
Checklist: