Skip to content

Commit

Permalink
Add default constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
ralf0131 committed Sep 12, 2019
1 parent aacb596 commit 8f228b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public class AlibabaMetricsExports extends Collector {
private Clock clock;
private MetricsCollectPeriodConfig metricsCollectPeriodConfig;

public AlibabaMetricsExports() {
this(Clock.defaultClock());
}

public AlibabaMetricsExports(Clock clock) {
this.sampleBuilder = new DefaultSampleBuilder();
this.clock = clock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void run() {
}
}).start();

CollectorRegistry.defaultRegistry.register(new AlibabaMetricsExports(Clock.defaultClock()));
CollectorRegistry.defaultRegistry.register(new AlibabaMetricsExports());
Server server = new Server(9000);
ServletContextHandler context = new ServletContextHandler();
context.setContextPath("/");
Expand Down

0 comments on commit 8f228b3

Please sign in to comment.