|
48 | 48 | public class HbaseTraceService implements TraceService {
|
49 | 49 | private final Logger logger = LogManager.getLogger(getClass());
|
50 | 50 |
|
| 51 | + private static final String MERGE_AGENT = "_ALL_"; |
| 52 | + |
51 | 53 | private final ThrottledLogger throttledLogger = ThrottledLogger.getLogger(logger, 10000);
|
52 | 54 |
|
53 | 55 | private final TraceDao traceDao;
|
@@ -177,12 +179,12 @@ private void insertSpanStat(SpanBo span) {
|
177 | 179 | span.getAcceptorHost(), spanServiceType, span.getAgentId(), span.getElapsed(), span.hasError());
|
178 | 180 | } else {
|
179 | 181 | // create virtual user
|
180 |
| - linkService.updateOutLink(span.getCollectorAcceptTime(), span.getApplicationName(), ServiceType.USER, span.getAgentId(), |
181 |
| - span.getApplicationName(), applicationServiceType, span.getAgentId(), span.getElapsed(), span.hasError()); |
| 182 | + linkService.updateOutLink(span.getCollectorAcceptTime(), span.getApplicationName(), ServiceType.USER, MERGE_AGENT, |
| 183 | + span.getApplicationName(), applicationServiceType, MERGE_AGENT, span.getElapsed(), span.hasError()); |
182 | 184 |
|
183 | 185 | // update the span information of the current node (self)
|
184 | 186 | linkService.updateInLink(span.getCollectorAcceptTime(), span.getApplicationName(), applicationServiceType,
|
185 |
| - span.getApplicationName(), ServiceType.USER, span.getAgentId(), span.getElapsed(), span.hasError()); |
| 187 | + span.getApplicationName(), ServiceType.USER, MERGE_AGENT, span.getElapsed(), span.hasError()); |
186 | 188 | }
|
187 | 189 | bugCheck++;
|
188 | 190 | }
|
@@ -280,7 +282,7 @@ private void insertSpanEventList(List<SpanEventBo> spanEventList, ServiceType ap
|
280 | 282 | * save information to draw a server map based on statistics
|
281 | 283 | */
|
282 | 284 | // save the information of outLink (the spanevent that called span)
|
283 |
| - linkService.updateOutLink(requestTime, applicationName, applicationServiceType, agentId, |
| 285 | + linkService.updateOutLink(requestTime, applicationName, applicationServiceType, MERGE_AGENT, |
284 | 286 | spanEventApplicationName, spanEventType, spanEventEndPoint, elapsed, hasException);
|
285 | 287 |
|
286 | 288 | // save the information of inLink (the span that spanevent called)
|
|
0 commit comments