Skip to content

Commit 129e285

Browse files
committed
Enhecement api description parser.
1 parent cb6011e commit 129e285

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

‎web/src/main/java/com/navercorp/pinpoint/web/vo/callstacks/RecordFactory.java‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
import com.navercorp.pinpoint.common.util.ApiDescriptionParser;
1414
import com.navercorp.pinpoint.web.calltree.span.CallTreeNode;
1515
import com.navercorp.pinpoint.web.calltree.span.SpanAlign;
16+
import org.slf4j.Logger;
17+
import org.slf4j.LoggerFactory;
1618

1719
public class RecordFactory {
20+
private final Logger logger = LoggerFactory.getLogger(this.getClass());
1821

1922
// spans with id = 0 are regarded as root - start at 1
2023
private int idGen = 1;
@@ -143,9 +146,13 @@ Api getApi(final SpanAlign align) {
143146
final ApiMetaDataBo apiMetaData = (ApiMetaDataBo) annotation.getValue();
144147
api.title = api.description = getApiInfo(apiMetaData);
145148
if (apiMetaData.getType() == 0) {
146-
ApiDescription apiDescription = apiDescriptionParser.parse(api.description);
147-
api.title = apiDescription.getSimpleMethodDescription();
148-
api.className = apiDescription.getSimpleClassName();
149+
try {
150+
ApiDescription apiDescription = apiDescriptionParser.parse(api.description);
151+
api.title = apiDescription.getSimpleMethodDescription();
152+
api.className = apiDescription.getSimpleClassName();
153+
} catch(Exception e) {
154+
logger.warn("Failed to api parse. {}", api.description, e);
155+
}
149156
}
150157
api.type = apiMetaData.getType();
151158
} else {

0 commit comments

Comments
 (0)