Skip to content

Commit

Permalink
update to new metrics SNAPSHOT api
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Apr 1, 2013
1 parent 191dd1e commit e3b4bbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Expand Up @@ -22,10 +22,7 @@ public static void dumpMetrics(PrintStream os) {
final MetricRegistry registry = getMetrics();

final MetricFilter filter = MetricFilter.ALL;
final ConsoleReporter reporter = new ConsoleReporter(registry,
os, Locale.getDefault(), new Clock.UserTimeClock(), TimeZone.getDefault(), TimeUnit.SECONDS,
TimeUnit.MILLISECONDS,
filter);
final ConsoleReporter reporter = ConsoleReporter.forRegistry(registry).build();

reporter.report(registry.getGauges(filter),
registry.getCounters(filter),
Expand Down
Expand Up @@ -11,7 +11,7 @@
public class ReporterFactory {

public AbstractPollingReporter registerGraphiteReporter(Graphite g, String prefix) {
GraphiteReporter r = new GraphiteReporter(RegistryService.getMetrics(), g, Clock.defaultClock(), prefix, TimeUnit.SECONDS, TimeUnit.MILLISECONDS, MetricFilter.ALL);
GraphiteReporter r = GraphiteReporter.forRegistry(RegistryService.getMetrics()).build(g);

r.start(1, TimeUnit.MINUTES);
return r;
Expand Down

0 comments on commit e3b4bbf

Please sign in to comment.