The mertics about jvm_memory_direct_bytes_used is acquired by netty's PlatformDependent#DIRECT_MEMORY_COUNTER.
Which can only acquired the memory used by netty.
How about rename jvm_memory_direct_bytes_used to netty_memory_direct_bytes_used,
And use java.nio.Bits#RESERVED_MEMORY for jvm direct memory metrics.
Original Issue: apache/bookkeeper#2637
The mertics about
jvm_memory_direct_bytes_used
is acquired by netty'sPlatformDependent#DIRECT_MEMORY_COUNTER
. Which can only acquired the memory used by netty. How about renamejvm_memory_direct_bytes_used
tonetty_memory_direct_bytes_used
,And use
java.nio.Bits#RESERVED_MEMORY
for jvm direct memory metrics.