Search in sources :

Example 1 with TraceRowKeyDecoderV2

use of com.navercorp.pinpoint.common.server.bo.serializer.trace.v2.TraceRowKeyDecoderV2 in project pinpoint by naver.

the class SpanUtilsTest method testGetTransactionId_BasicSpan.

@Test
public void testGetTransactionId_BasicSpan() {
    SpanBo spanBo = new SpanBo();
    TransactionId spanTransactionId = new TransactionId("traceAgentId", System.currentTimeMillis(), 1111);
    spanBo.setTransactionId(spanTransactionId);
    byte[] transactionIdRowkey = SpanUtils.getTransactionId(spanBo);
    TraceRowKeyDecoderV2 decoder = new TraceRowKeyDecoderV2();
    TransactionId transactionId = decoder.readTransactionId(transactionIdRowkey);
    Assert.assertEquals(transactionId, spanBo.getTransactionId());
}
Also used : TraceRowKeyDecoderV2(com.navercorp.pinpoint.common.server.bo.serializer.trace.v2.TraceRowKeyDecoderV2) SpanBo(com.navercorp.pinpoint.common.server.bo.SpanBo) TransactionId(com.navercorp.pinpoint.common.util.TransactionId) Test(org.junit.Test)

Aggregations

SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)1 TraceRowKeyDecoderV2 (com.navercorp.pinpoint.common.server.bo.serializer.trace.v2.TraceRowKeyDecoderV2)1 TransactionId (com.navercorp.pinpoint.common.util.TransactionId)1 Test (org.junit.Test)1