Commit 3f7016ef by Yiming Liu

Add Netflix spectator as Metrics Impl

parent f9cc81b4
......@@ -3,7 +3,6 @@ package com.ctrip.apollo.biz.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.boot.actuate.metrics.CounterService;
import com.ctrip.apollo.biz.entity.App;
import com.ctrip.apollo.biz.entity.AppNamespace;
import com.ctrip.apollo.biz.entity.Cluster;
......@@ -30,12 +29,8 @@ public class AdminService {
@Autowired
private ClusterRepository clusterRepository;
@Autowired
private CounterService counter;
public App createNewApp(App app) {
counter.increment("admin.createNewApp.start");
String createBy = app.getDataChangeCreatedBy();
App createdApp = appRepository.save(app);
String appId = createdApp.getAppId();
......@@ -46,7 +41,6 @@ public class AdminService {
createDefaultNamespace(appId, createBy);
counter.increment("admin.createNewApp.success");
return app;
}
......
......@@ -24,6 +24,10 @@
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-spectator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment