'Object size in SpringBoot application

I want to find my Object size when application is running. I want show my Object size in Grafana with micrometer.
My Object like Person, Student,....
What should i do?
Object size like File size, volume of Object



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source