use of com.navercorp.pinpoint.common.server.bo.BasicSpan in project pinpoint by naver.
the class SpanEventSerializer method writeQualifier.
private ByteBuffer writeQualifier(SpanEventEncodingContext spanEventEncodingContext) {
SpanEventBo spanEventBo = spanEventEncodingContext.getSpanEventBo();
BasicSpan basicSpan = spanEventEncodingContext.getBasicSpan();
final Buffer rowId = new AutomaticBuffer();
rowId.putLong(basicSpan.getSpanId());
rowId.putShort(spanEventBo.getSequence());
rowId.putInt(spanEventBo.getAsyncId());
rowId.putShort(spanEventBo.getAsyncSequence());
return rowId.wrapByteBuffer();
}
use of com.navercorp.pinpoint.common.server.bo.BasicSpan in project pinpoint by naver.
the class SpanEventSerializer method writeValue.
public ByteBuffer writeValue(SpanEventEncodingContext spanEventEncodingContext) {
SpanEventBo spanEventBo = spanEventEncodingContext.getSpanEventBo();
BasicSpan basicSpan = spanEventEncodingContext.getBasicSpan();
final Buffer buffer = new AutomaticBuffer(512);
buffer.putByte(spanEventBo.getVersion());
buffer.putPrefixedString(basicSpan.getAgentId());
buffer.putPrefixedString(basicSpan.getApplicationId());
buffer.putVLong(basicSpan.getAgentStartTime());
buffer.putVInt(spanEventBo.getStartElapsed());
buffer.putVInt(spanEventBo.getEndElapsed());
// don't need to put sequence because it is set at Qualifier
// buffer.put(sequence);
buffer.putPrefixedString(spanEventBo.getRpc());
buffer.putShort(spanEventBo.getServiceType());
buffer.putPrefixedString(spanEventBo.getEndPoint());
buffer.putPrefixedString(spanEventBo.getDestinationId());
buffer.putSVInt(spanEventBo.getApiId());
buffer.putSVInt(spanEventBo.getDepth());
buffer.putLong(spanEventBo.getNextSpanId());
if (spanEventBo.hasException()) {
buffer.putBoolean(true);
buffer.putSVInt(spanEventBo.getExceptionId());
buffer.putPrefixedString(spanEventBo.getExceptionMessage());
} else {
buffer.putBoolean(false);
}
final List<AnnotationBo> annotationBoList = spanEventBo.getAnnotationBoList();
this.annotationSerializer.writeAnnotationList(annotationBoList, buffer);
buffer.putSVInt(spanEventBo.getNextAsyncId());
return buffer.wrapByteBuffer();
}
Aggregations