diff --git a/build.xml b/build.xml
index 3c0518918..6d8ef8144 100644
--- a/build.xml
+++ b/build.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/src/main/java/com/profiler/context/AsyncTrace.java b/src/main/java/com/profiler/context/AsyncTrace.java
index 52b5554e1..7669a210e 100644
--- a/src/main/java/com/profiler/context/AsyncTrace.java
+++ b/src/main/java/com/profiler/context/AsyncTrace.java
@@ -104,10 +104,6 @@ public class AsyncTrace {
this.spanEvent.setServiceType(serviceType);
}
- public void recordServiceName(final String serviceName) {
- this.spanEvent.setServiceName(serviceName);
- }
-
public void recordRpcName(final String rpcName) {
this.spanEvent.setRpc(rpcName);
diff --git a/src/main/java/com/profiler/context/SpanChunk.java b/src/main/java/com/profiler/context/SpanChunk.java
index 49ead1085..7df0e36c0 100644
--- a/src/main/java/com/profiler/context/SpanChunk.java
+++ b/src/main/java/com/profiler/context/SpanChunk.java
@@ -24,7 +24,9 @@ public class SpanChunk implements Thriftable {
// TODO 반드시 1개 이상이라는 조건을 충족해야 된다.
SpanEvent first = spanEventList.get(0);
Span parentSpan = first.getParentSpan();
+
tSpanChunk.setAgentId(Agent.getInstance().getAgentId());
+ tSpanChunk.setApplicationId(Agent.getInstance().getApplicationName());
tSpanChunk.setAgentIdentifier(Agent.getInstance().getIdentifier());
UUID id = parentSpan.getTraceID().getId();
@@ -44,8 +46,9 @@ public class SpanChunk implements Thriftable {
for (SpanEvent spanEvent : spanEventList) {
com.profiler.common.dto.thrift.SpanEvent tSpanEvent = new com.profiler.common.dto.thrift.SpanEvent();
- tSpanEvent.setAgentId(Agent.getInstance().getAgentId());
- tSpanEvent.setAgentIdentifier(Agent.getInstance().getIdentifier());
+// tSpanEvent.setAgentId(Agent.getInstance().getAgentId());
+// tSpanEvent.setApplicationId(Agent.getInstance().getApplicationName());
+// tSpanEvent.setAgentIdentifier(Agent.getInstance().getIdentifier());
long parentSpanStartTime = spanEvent.getParentSpan().getStartTime();
tSpanEvent.setStartElapsed((int) (spanEvent.getStartTime() - parentSpanStartTime));
@@ -54,12 +57,10 @@ public class SpanChunk implements Thriftable {
tSpanEvent.setSequence(spanEvent.getSequence());
tSpanEvent.setRpc(spanEvent.getRpc());
-// tSpanEvent.setServiceName(spanEvent.getServiceName());
tSpanEvent.setServiceType(spanEvent.getServiceType().getCode());
tSpanEvent.setDestinationId(spanEvent.getDestionationId());
tSpanEvent.setEndPoint(spanEvent.getEndPoint());
- tSpanEvent.setDestinationId(spanEvent.getDestionationId());
// 여기서 데이터 인코딩을 하자.
List annotationList = new ArrayList(spanEvent.getAnnotationSize());
@@ -80,4 +81,6 @@ public class SpanChunk implements Thriftable {
}
return result;
}
+
+
}
diff --git a/src/main/java/com/profiler/context/SpanEvent.java b/src/main/java/com/profiler/context/SpanEvent.java
index a51664c5e..b8fbbfb8b 100644
--- a/src/main/java/com/profiler/context/SpanEvent.java
+++ b/src/main/java/com/profiler/context/SpanEvent.java
@@ -19,7 +19,6 @@ public class SpanEvent implements Thriftable {
private long startTime;
private long endTime;
- private String serviceName;
private String rpc;
private ServiceType serviceType;
@@ -65,13 +64,6 @@ public class SpanEvent implements Thriftable {
return this.endPoint;
}
- public String getServiceName() {
- return serviceName;
- }
-
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
public String getRpc() {
return rpc;
@@ -154,7 +146,6 @@ public class SpanEvent implements Thriftable {
sb.append(",\n\t StartTime=").append(startTime);
sb.append(", EndTime=").append(endTime);
sb.append(",\n\t Name=").append(rpc);
- sb.append(", ServiceName=").append(serviceName);
sb.append(", ServiceType=").append(serviceType);
sb.append(", EndPoint=").append(endPoint);
sb.append(", Seq=").append(sequence);
@@ -181,9 +172,10 @@ public class SpanEvent implements Thriftable {
spanEvent.setEndElapsed((int) (endTime - startTime));
spanEvent.setSequence(sequence);
- // 다른 span의 sub로 들어가지 않을 경우
+ // Span내부의 SpanEvent로 들어가지 않을 경우
if (!child) {
spanEvent.setAgentId(Agent.getInstance().getAgentId());
+ spanEvent.setAgentId(Agent.getInstance().getApplicationName());
spanEvent.setAgentIdentifier(Agent.getInstance().getIdentifier());
TraceID parentSpanTraceID = parentSpan.getTraceID();
@@ -193,19 +185,15 @@ public class SpanEvent implements Thriftable {
}
spanEvent.setRpc(rpc);
- spanEvent.setServiceName(serviceName);
-
- if (serviceType != null) {
- spanEvent.setServiceType(serviceType.getCode());
- }
-
+ spanEvent.setServiceType(serviceType.getCode());
+
spanEvent.setEndPoint(endPoint);
spanEvent.setDestinationId(this.destionationId);
// 여기서 데이터 인코딩을 하자.
List annotationList = new ArrayList(annotations.size());
- for (Annotation a : annotations) {
- annotationList.add(a.toThrift());
+ for (Annotation annotation : annotations) {
+ annotationList.add(annotation.toThrift());
}
spanEvent.setAnnotations(annotationList);
diff --git a/src/main/java/com/profiler/modifier/arcus/interceptors/BaseOperationTransitionStateInterceptor.java b/src/main/java/com/profiler/modifier/arcus/interceptors/BaseOperationTransitionStateInterceptor.java
index a29135e99..a63c58c78 100644
--- a/src/main/java/com/profiler/modifier/arcus/interceptors/BaseOperationTransitionStateInterceptor.java
+++ b/src/main/java/com/profiler/modifier/arcus/interceptors/BaseOperationTransitionStateInterceptor.java
@@ -74,7 +74,6 @@ public class BaseOperationTransitionStateInterceptor implements StaticBeforeInte
}
asyncTrace.recordServiceType(svcType);
- asyncTrace.recordServiceName(serviceCode);
asyncTrace.recordRpcName(baseOperation.getClass().getSimpleName());
asyncTrace.recordDestinationId(serviceCode);
diff --git a/src/main/java/com/profiler/modifier/bloc/handler/interceptors/ExecuteMethodInterceptor.java b/src/main/java/com/profiler/modifier/bloc/handler/interceptors/ExecuteMethodInterceptor.java
index b337bb1c1..9878e1aa7 100644
--- a/src/main/java/com/profiler/modifier/bloc/handler/interceptors/ExecuteMethodInterceptor.java
+++ b/src/main/java/com/profiler/modifier/bloc/handler/interceptors/ExecuteMethodInterceptor.java
@@ -68,8 +68,6 @@ public class ExecuteMethodInterceptor implements StaticAroundInterceptor, ByteCo
trace.markBeforeTime();
trace.recordServiceType(ServiceType.BLOC);
- // EXECUTEMETHOD interceptor는 span만 적용된 가능성이 있어서 같아서 유지함. Span의 ApplicationName으로 들어가도록 추가 수정해야 됨.
-// trace.recordServiceName(traceContext.getApplicationId());
trace.recordRpcName(requestURL);
diff --git a/src/main/java/com/profiler/modifier/connector/interceptors/Execute2MethodInterceptor.java b/src/main/java/com/profiler/modifier/connector/interceptors/Execute2MethodInterceptor.java
index e0f742f1b..dde0e9b03 100644
--- a/src/main/java/com/profiler/modifier/connector/interceptors/Execute2MethodInterceptor.java
+++ b/src/main/java/com/profiler/modifier/connector/interceptors/Execute2MethodInterceptor.java
@@ -62,7 +62,6 @@ public class Execute2MethodInterceptor implements StaticAroundInterceptor, ByteC
HttpHost host = extractHost(request.getURI());
trace.recordServiceType(ServiceType.HTTP_CLIENT);
-// trace.recordServiceName(request.getProtocolVersion().toString());
trace.recordRpcName("CLIENT");
int port = host.getPort();
diff --git a/src/main/java/com/profiler/modifier/connector/interceptors/ExecuteMethodInterceptor.java b/src/main/java/com/profiler/modifier/connector/interceptors/ExecuteMethodInterceptor.java
index 0cd259f65..89fd63779 100644
--- a/src/main/java/com/profiler/modifier/connector/interceptors/ExecuteMethodInterceptor.java
+++ b/src/main/java/com/profiler/modifier/connector/interceptors/ExecuteMethodInterceptor.java
@@ -63,7 +63,6 @@ public class ExecuteMethodInterceptor implements StaticAroundInterceptor, ByteCo
request.addHeader(Header.HTTP_FLAGS.toString(), String.valueOf(nextId.getFlags()));
trace.recordServiceType(ServiceType.HTTP_CLIENT);
-// trace.recordServiceName(request.getProtocolVersion().toString());
trace.recordRpcName("CLIENT");
int port = host.getPort();