astefanutti / metrics-aspectj

AspectJ integration for Dropwizard Metrics
Apache License 2.0
81 stars 39 forks source link

About metrics reporter #18

Closed Black-Mamba24 closed 7 years ago

Black-Mamba24 commented 7 years ago

After integrating metrics-aspectj, but there is no reporter. If not use metrics annotation, it can be used by

ConsoleReporter.forRegistry(metricRegistry).build().start(15, TimeUnit.SECONDS)

can i get the metricRegistry from metrics-aspectj? please offer a proposal, thx

Black-Mamba24 commented 7 years ago

I understand.. write like this:

    public AnnotationService(MetricRegistry registry) {
        this.registry = registry;
        ConsoleReporter.forRegistry(this.registry).build().start(10, TimeUnit.SECONDS);
    }