use of com.navercorp.pinpoint.common.server.trace.ApiParser in project pinpoint by naver.
the class RecordFactory method getApi.
private Api getApi(final Align align) {
final AnnotationBo annotation = AnnotationUtils.findAnnotationBo(align.getAnnotationBoList(), AnnotationKey.API_METADATA);
if (annotation != null) {
final ApiMetaDataBo apiMetaData = (ApiMetaDataBo) annotation.getValue();
String apiInfo = apiMetaData.getDescription();
if (apiMetaData.getMethodTypeEnum() == MethodTypeEnum.DEFAULT) {
ApiParser parser = apiParserProvider.getParser();
return parser.parse(apiMetaData);
}
// parse error
return new Api(apiInfo, "", apiInfo, apiMetaData.getMethodTypeEnum());
} else {
AnnotationKey apiMetaDataError = getApiMetaDataError(align.getAnnotationBoList());
return new Api(apiMetaDataError.getName(), "", "", MethodTypeEnum.DEFAULT);
}
}
Aggregations