Hi,
I wonder if it's possible to have generic/default producers? I understand that I can use explicit producers, but that creates a lot of duplicated code.
@Produces
@Metric
Timer Timer = new Timer(new MyFancyReservoir());
@Timed(name = "customTimerA")
void timedMethodA() {
// Timer name => TimedMethodBean.customTimerA
}
@Timed(name = "customTimerB")
void timedMethodB() {
// Timer name => TimedMethodBean.customTimerB
}
Hi,
I wonder if it's possible to have generic/default producers? I understand that I can use explicit producers, but that creates a lot of duplicated code.