[Collector] Tolerate and ignore unsupport segments (#1385)

* #1207

Return true when segment parse throw exception to avoid parse the segment over and over again which read from buffer file.

* no message
This commit is contained in:
彭勇升 pengys 2018-06-25 22:32:12 +08:00 committed by 吴晟 Wu Sheng
parent 5e03ec8845
commit b35eaace79
2 changed files with 10 additions and 10 deletions

View File

@ -100,14 +100,14 @@ public class AnalysisMetricModuleProvider extends ModuleProvider {
private void segmentParserListenerRegister() {
ISegmentParserListenerRegister segmentParserListenerRegister = getManager().find(AnalysisSegmentParserModule.NAME).getService(ISegmentParserListenerRegister.class);
segmentParserListenerRegister.register(new ServiceReferenceMetricSpanListener.Factory()); //11000TPS
segmentParserListenerRegister.register(new ApplicationComponentSpanListener.Factory()); //17000TPS
segmentParserListenerRegister.register(new ApplicationMappingSpanListener.Factory()); //22000TPS
segmentParserListenerRegister.register(new InstanceMappingSpanListener.Factory()); //22000TPS
segmentParserListenerRegister.register(new GlobalTraceSpanListener.Factory()); //15000TPS
segmentParserListenerRegister.register(new SegmentDurationSpanListener.Factory()); //13000TPS
segmentParserListenerRegister.register(new ResponseTimeDistributionSpanListener.Factory()); //25000TPS
segmentParserListenerRegister.register(new ServiceNameSpanListener.Factory()); //20000TPS
segmentParserListenerRegister.register(new ServiceReferenceMetricSpanListener.Factory());
segmentParserListenerRegister.register(new ApplicationComponentSpanListener.Factory());
segmentParserListenerRegister.register(new ApplicationMappingSpanListener.Factory());
segmentParserListenerRegister.register(new InstanceMappingSpanListener.Factory());
segmentParserListenerRegister.register(new GlobalTraceSpanListener.Factory());
segmentParserListenerRegister.register(new SegmentDurationSpanListener.Factory());
segmentParserListenerRegister.register(new ResponseTimeDistributionSpanListener.Factory());
segmentParserListenerRegister.register(new ServiceNameSpanListener.Factory());
}
private void graphCreate(WorkerCreateListener workerCreateListener) {

View File

@ -82,10 +82,10 @@ public class SegmentParse {
buildSegment(segmentCoreInfo.getSegmentId(), segmentDecorator.toByteArray());
return true;
}
} catch (InvalidProtocolBufferException e) {
} catch (Throwable e) {
logger.error(e.getMessage(), e);
return true;
}
return false;
}
@GraphComputingMetric(name = "/segment/parse/parseBinarySegment")