palominolabs/metrics-guice

Metrics for Instances created via Provider

Closed this issue · 3 comments

Is there a way to get around this limitation and enable metric annotations?

Fundamentally Guice AOP works by manipulating instances it creates. It can't do that if you create the instance.

There are different ways to structure logic that will let Guice create instances, like using a Provider to create an instance that then is used by Guice to create another instance that simply delegates all method calls to the inner instance, but the core behavior of Guice won't change.

Great Idea! Thanks @marshallpierce.

Closing due to inactivity.