mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-21 02:35:53 +10:00
[유치수] [NOBTS] 서버맵에서 hostname조회 개선. agentinfo는 ip와 hostname을 수집하고 view에서는 hostname을 조회해서 보여준다.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1340 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -32,6 +32,7 @@ public class Agent implements Runnable {
|
||||
private DataSender priorityDataSender;
|
||||
private DataSender dataSender;
|
||||
|
||||
private final String machineName;
|
||||
private final String agentId;
|
||||
private final String nodeName;
|
||||
private final String applicationName;
|
||||
@@ -83,7 +84,7 @@ public class Agent implements Runnable {
|
||||
|
||||
// TODO 일단 임시로 호환성을 위해 agentid에 machinename을 넣도록 하자
|
||||
// TODO 박스 하나에 서버 인스턴스를 여러개 실행할 때에 문제가 될 수 있음.
|
||||
String machineName = NetworkUtils.getMachineName();
|
||||
this.machineName = NetworkUtils.getMachineName();
|
||||
this.agentId = getId("hippo.agentId", machineName, HBaseTables.AGENT_NAME_MAX_LEN);
|
||||
this.nodeName = System.getProperty("hippo.nodeName", machineName);
|
||||
this.applicationName = getId("hippo.applicationName", "UnknownApplicationName", HBaseTables.APPLICATION_NAME_MAX_LEN);
|
||||
@@ -124,7 +125,8 @@ public class Agent implements Runnable {
|
||||
|
||||
AgentInfo agentInfo = new AgentInfo();
|
||||
|
||||
agentInfo.setHostname(ip);
|
||||
agentInfo.setIp(ip);
|
||||
agentInfo.setHostname(this.machineName);
|
||||
agentInfo.setPorts(ports);
|
||||
|
||||
agentInfo.setAgentId(getAgentId());
|
||||
|
||||
Reference in New Issue
Block a user