Skip to content

Generic Producers #12

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
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions