mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-16 08:16:15 +10:00
[강운덕] [LUCYSUS-1744] apiId를 annotation에 넣지 않고 span, spanEvent에 직접 id를 넣도록 변경함.
- traceAgentId가 agentId와 동일한 데이터 일경우 traceid를 레코딩 하지 않도록 변경함. 변경후 mysql최초 connect시 데이터 사이가 4250->4023으로 약 5%줄어듬. mysq 최초 connect의 경우 db문자열이 큰 1.5k정도의 사이즈를 이미차지 하고 있어 실제 5%이상의 성능향상이라고 볼수도 잇음. git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-server/trunk@2509 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -41,6 +41,10 @@ public class SpanChunkHandler implements SimpleHandler {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received SpanChunk={}", spanChunk);
|
||||
}
|
||||
String traceAgentId = spanChunk.getTraceAgentId();
|
||||
if (traceAgentId == null) {
|
||||
spanChunk.setTraceAgentId(spanChunk.getAgentId());
|
||||
}
|
||||
|
||||
traceDao.insertSpanChunk(spanChunk);
|
||||
|
||||
|
||||
@@ -38,6 +38,10 @@ public class SpanEventHandler implements SimpleHandler {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received SpanEvent={}", spanEvent);
|
||||
}
|
||||
String traceAgentId = spanEvent.getTraceAgentId();
|
||||
if (traceAgentId == null) {
|
||||
spanEvent.setTraceAgentId(spanEvent.getAgentKey().getAgentId());
|
||||
}
|
||||
|
||||
traceDao.insertEvent(spanEvent);
|
||||
|
||||
|
||||
@@ -44,12 +44,15 @@ public class SpanHandler implements SimpleHandler {
|
||||
|
||||
try {
|
||||
TSpan span = (TSpan) tbase;
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received SPAN={}", span);
|
||||
}
|
||||
String traceAgentId = span.getTraceAgentId();
|
||||
if (traceAgentId == null) {
|
||||
span.setTraceAgentId(span.getAgentId());
|
||||
}
|
||||
|
||||
traceDao.insert(span);
|
||||
traceDao.insert(span);
|
||||
// traceIndexDao.insert(span);
|
||||
applicationTraceIndexDao.insert(span);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user