Skip to content

Generic Producers #12

@mseitner

Description

@mseitner

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
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions