mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-16 00:05:57 +10:00
[강운덕] [LUCYSUS-1744] traceId를 transactionId로 변경함.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-commons/trunk@2298 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -6,12 +6,12 @@ import java.util.List;
|
||||
|
||||
import com.nhn.pinpoint.common.ServiceType;
|
||||
import com.nhn.pinpoint.common.buffer.AutomaticBuffer;
|
||||
import com.nhn.pinpoint.common.util.TransactionIdUtils;
|
||||
import com.nhn.pinpoint.thrift.dto.Annotation;
|
||||
import com.nhn.pinpoint.thrift.dto.Span;
|
||||
import com.nhn.pinpoint.common.buffer.Buffer;
|
||||
import com.nhn.pinpoint.common.util.BytesUtils;
|
||||
import com.nhn.pinpoint.common.buffer.FixedBuffer;
|
||||
import com.nhn.pinpoint.common.util.TraceIdUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -121,7 +121,7 @@ public class SpanBo implements com.nhn.pinpoint.common.bo.Span {
|
||||
}
|
||||
|
||||
public String getTraceId() {
|
||||
return TraceIdUtils.formatString(traceAgentId, traceAgentStartTime, traceTransactionId);
|
||||
return TransactionIdUtils.formatString(traceAgentId, traceAgentStartTime, traceTransactionId);
|
||||
}
|
||||
|
||||
public String getAgentId() {
|
||||
|
||||
+1
-10
@@ -3,7 +3,7 @@ package com.nhn.pinpoint.common.util;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class TraceIdUtils {
|
||||
public class TransactionIdUtils {
|
||||
|
||||
public static final String formatString(String agentId, long agentStartTime, long transactionId) {
|
||||
if (agentId == null) {
|
||||
@@ -16,15 +16,6 @@ public class TraceIdUtils {
|
||||
digits(transactionId, 12));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static final String formatString(long mostSigBits, long leastSigBits) {
|
||||
return (digits(mostSigBits >> 32, 8) + "-" +
|
||||
digits(mostSigBits >> 16, 4) + "-" +
|
||||
digits(mostSigBits, 4) + "-" +
|
||||
digits(leastSigBits >> 48, 4) + "-" +
|
||||
digits(leastSigBits, 12));
|
||||
}
|
||||
|
||||
private static String digits(long val, int digits) {
|
||||
long hi = 1L << (digits * 4);
|
||||
return Long.toHexString(hi | (val & (hi - 1))).substring(1);
|
||||
Reference in New Issue
Block a user