Skip to content
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

Prevent growing metrics cardinality #2

Merged
merged 1 commit into from
Apr 30, 2021
Merged

Prevent growing metrics cardinality #2

merged 1 commit into from
Apr 30, 2021

Conversation

spkrka
Copy link
Member

@spkrka spkrka commented Apr 30, 2021

We can have an infinitely growing set of thread names that have
been used by the JVM. By replacing all numbers with a
constant character, we can minimize that problem, since thread pools
typically use counters when creating new threads.

@spkrka
Copy link
Member Author

spkrka commented Apr 30, 2021

@mattnworb

Copy link
Member

@mattnworb mattnworb left a comment

Choose a reason for hiding this comment

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

Great idea.

Did you think about what happens when there are thread names like pool-4-thread-1 and pool-11-thread-2? They'd sanitize to the same string which could make it hard to identify which has blocking calls, but then again perhaps that's a sign that you should give the pools actual names.

Also how about adding something to the README about this behavior?

@spkrka spkrka force-pushed the krka/threadname2 branch from b76ade2 to ffbc30f Compare April 30, 2021 12:58
@spkrka
Copy link
Member Author

spkrka commented Apr 30, 2021

Thanks @mattnworb , pushed an update to the README

We can have an infinitely growing set of thread names that have
been used by the JVM. By replacing all numbers with a
constant character, we can minimize that problem, since thread pools
typically use counters when creating new threads.
@spkrka spkrka force-pushed the krka/threadname2 branch from ffbc30f to d850906 Compare April 30, 2021 12:59
@spkrka spkrka merged commit 6b9c97c into main Apr 30, 2021
@spkrka spkrka deleted the krka/threadname2 branch April 30, 2021 14:26
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.

3 participants