-
Notifications
You must be signed in to change notification settings - Fork 922
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
Automatically register the metics of PooledByteBufAllocator.DEFAULT
#5916
Conversation
Motivation: Add metrics related to PooledByteBufAllocator that are already exposed by the netty. Modifications: - The PooledByteBufAllocator metric is now available in MoreMeterBinders. - To expose the PooledByteBufAllocator metrics, created the PooledByteBufAllocatorMetrics class. Result: Enables the PooledByteBufAllocator metric.
Micrometer already provides bindings to Netty Metrics (ref: https://docs.micrometer.io/micrometer/reference/reference/netty.html) I prefer that we either:
Let me know what you think @line/dx |
I didn't know that Netty metrics were supported by Micrometer finally. I prefer automatically setting the metric for the default one ( |
@ikhoon @jrhee17 @trustin @minwoox |
I think my intention was not conveyed. Unlike when you first created this PR, Micrometer now supports Netty metrics. Let me add a commit to apply that. |
PooledByteBufAllocator.DEFAULT
Changed the title of this PR to reflect the purpose. 🙇♂️ |
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.
Thanks, @Bue-von-hon 👍🙏
import io.netty.channel.EventLoopGroup; | ||
|
||
/** | ||
* Provides useful {@link MeterBinder}s to monitor various Armeria components. | ||
*/ | ||
public final class MoreMeterBinders { | ||
|
||
static { | ||
// Bind the default Netty allocator metrics to the default MeterRegistry. | ||
new NettyAllocatorMetrics(PooledByteBufAllocator.DEFAULT) |
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.
Note: armeria
always initializes this class when a client or server is built
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.
Thanks!
@Bue-von-hon Thanks for your effort. That said maintainers are working on various issues and are aware of the status of this PR, so you may not need to keep mentioning us. 🙏 |
Motivation:
Add metrics related to PooledByteBufAllocator that is already exposed by the netty.
Modifications:
NettyAllocatorMetrics
are registered when MoreMeterBinders is initialized.Result:
PooledByteBufAllocator
#2633PooledByteBufAllocator.DEFAULT
.