Adds ability to exclude deadlocked threads from exported metrics#612
Adds ability to exclude deadlocked threads from exported metrics#612askoog wants to merge 3 commits intoprometheus:mainfrom
Conversation
Finding deadlocked threads might be an expensive operation if there are a large number of threads in the jvm since it requires a safepoint.
Finding deadlocked threads might be an expensive operation if there are a large number of threads in the jvm since it requires a safepoint. Signed-off-by: Andreas Skoog <andreas.skoog@avanza.se>
git@github.com:askoog/client_java.git into optional-deadlocked-threads-metric Signed-off-by: Andreas Skoog <andreas.skoog@avanza.se>
ffa9616 to
1afba44
Compare
brian-brazil
left a comment
There was a problem hiding this comment.
How would the user access the object to call this?
| */ | ||
| public class ThreadExports extends Collector { | ||
| private final ThreadMXBean threadBean; | ||
| private boolean includeDeadlockedThreads = true; |
There was a problem hiding this comment.
Locking in what way? Better to set it in overloaded constructor?
There was a problem hiding this comment.
That's one option, this can be accessed and mutated concurrently which is the issue. You could also split this out to a completely separate collector.
I suppose you need to do instantiate the |
|
This PR has been marked as stale due to 120 days of inactivity. It will be automatically closed if there is no further activity over the next 30 days. |
|
This PR was automatically closed due to lack of activity after being marked stale. Feel free to reopen if you would like to continue working on it. |
Finding deadlocked threads might be an expensive operation if there are
a large number of threads in the jvm since it requires a safepoint.