use of com.navercorp.pinpoint.common.server.bo.ApiMetaDataBo in project pinpoint by naver.
the class HbaseApiMetaDataDao method getApiMetaData.
@Override
@Cacheable(value = "apiMetaData", key = SPEL_KEY)
public List<ApiMetaDataBo> getApiMetaData(String agentId, long time, int apiId) {
if (agentId == null) {
throw new NullPointerException("agentId must not be null");
}
ApiMetaDataBo apiMetaDataBo = new ApiMetaDataBo(agentId, time, apiId);
byte[] sqlId = getDistributedKey(apiMetaDataBo.toRowKey());
Get get = new Get(sqlId);
get.addFamily(HBaseTables.API_METADATA_CF_API);
return hbaseOperations2.get(HBaseTables.API_METADATA, get, apiMetaDataMapper);
}
use of com.navercorp.pinpoint.common.server.bo.ApiMetaDataBo in project pinpoint by naver.
the class CorruptedSpanAlignFactory method get.
public SpanAlign get(final String title, final SpanBo span, final SpanEventBo spanEvent) {
final SpanEventBo missedEvent = new SpanEventBo();
// TODO use invalid event information ?
missedEvent.setStartElapsed(spanEvent.getStartElapsed());
missedEvent.setEndElapsed(spanEvent.getEndElapsed());
missedEvent.setServiceType(ServiceType.COLLECTOR.getCode());
List<AnnotationBo> annotations = new ArrayList<>();
ApiMetaDataBo apiMetaData = new ApiMetaDataBo();
apiMetaData.setLineNumber(-1);
apiMetaData.setApiInfo("...");
apiMetaData.setMethodTypeEnum(MethodTypeEnum.CORRUPTED);
final AnnotationBo apiMetaDataAnnotation = new AnnotationBo();
apiMetaDataAnnotation.setKey(AnnotationKey.API_METADATA.getCode());
apiMetaDataAnnotation.setValue(apiMetaData);
annotations.add(apiMetaDataAnnotation);
final AnnotationBo argumentAnnotation = new AnnotationBo();
argumentAnnotation.setKey(AnnotationKeyUtils.getArgs(0).getCode());
if (System.currentTimeMillis() - span.getStartTime() < timeoutMillisec) {
argumentAnnotation.setValue("Corrupted(waiting for packet) ");
} else {
if (title != null) {
argumentAnnotation.setValue("Corrupted(" + title + ")");
} else {
argumentAnnotation.setValue("Corrupted");
}
}
annotations.add(argumentAnnotation);
missedEvent.setAnnotationBoList(annotations);
return new SpanAlign(span, missedEvent);
}
Aggregations