flysqrlboy commented on issue #1547: Some span segments in a trace  disappeared 
In my custom agent plugin
URL: 
https://github.com/apache/incubator-skywalking/issues/1547#issuecomment-415968936
 
 
   With the help of @wu-sheng , I found the cause of the issue. It turns out 
some exceptions occurred when collectors received segment info from agents. The 
exception as below (from 
apache-skywalking-apm-incubating/logs/skywalking-collector-server.log):
   
   
   ```
   java.lang.NullPointerException: null
        at 
org.apache.skywalking.apm.collector.configuration.service.ComponentLibraryCatalogService.getComponentId(ComponentLibraryCatalogService.java:50)
 ~[collector-configuration-provider-5.0.0-beta2.jar:5.0.0-beta2]
        at 
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.standardization.SpanIdExchanger.exchange(SpanIdExchanger.java:62)
 ~[segment-parser-provider-5.0.0-beta2.jar:5.0.0-beta2]
        at 
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.SegmentParse.preBuild(SegmentParse.java:119)
 ~[segment-parser-provider-5.0.0-beta2.jar:5.0.0-beta2]
        at 
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.SegmentParse.parse(SegmentParse.java:67)
 [segment-parser-provider-5.0.0-beta2.jar:5.0.0-beta2]
        at 
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.service.SegmentParseService.parse(SegmentParseService.java:42)
 [segment-parser-provider-5.0.0-beta2.jar:5.0.0-beta2]
        at 
org.apache.skywalking.apm.collector.agent.grpc.provider.handler.TraceSegmentServiceHandler$1.onNext(TraceSegmentServiceHandler.java:51)
 [agent-grpc-provider-5.0.0-beta2.jar.bak.jar:5.0.0-beta2]
        at 
org.apache.skywalking.apm.collector.agent.grpc.provider.handler.TraceSegmentServiceHandler$1.onNext(TraceSegmentServiceHandler.java:45)
 [agent-grpc-provider-5.0.0-beta2.jar.bak.jar:5.0.0-beta2]
        at 
io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:248)
 [grpc-stub-1.10.0.jar:1.10.0]
        at 
io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:252)
 [grpc-core-1.10.0.jar:1.10.0]
        at 
io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:629)
 [grpc-core-1.10.0.jar:1.10.0]
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) 
[grpc-core-1.10.0.jar:1.10.0]
        at 
io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) 
[grpc-core-1.10.0.jar:1.10.0]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_144]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_144]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
   ```
   
   It tells us that it returns null when "getComponentId" method be invoked. 
Because the "DC" is my custom component, but I didn't declared it in the 
"config/component-libraries.yml" file.  
   
   The solution of the problem is to add the declarations of "DC" in 
component-libraries.yml, like this:
   
   ```
   DC:
     id: 10001
     languages: Java
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to