You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/07/01 09:54:18 UTC

[GitHub] [skywalking] jmjoy opened a new issue, #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

jmjoy opened a new issue, #9297:
URL: https://github.com/apache/skywalking/issues/9297

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   Now the [`skywalking-rust`](https://github.com/apache/skywalking-rust) only support one thread tracing, but usually there are some scenes that require multi threads/coroutines tracing.
   
   ### Use case
   
   Rust application requires multi threads and coroutines tracing.
   
   ### Related issues
   
   <https://github.com/apache/skywalking-rust/pull/20#issuecomment-1153411401>
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] lujiajing1126 commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1172291853

   > What is the purpose of `ctx#capture` and `ctx2#continous`? Is there other language can be referenced? I just think it can add a parameter like `TRACING_MANAGER.create_context(parent_context)`.
   
   Every `Segment` in SkyWalking exists in a single thread while a transaction/trace may consist of multiple operations across threads. To rebuild the whole trace in the backend (i.e. OAP), we have to link segments together with the help of contextual information, e.g. `traceID`, `segmentID`, `spanID`.
   
   `Context.capture` and `Context. continous` are key methods to **capture** the context in a thread and **restore** the "context" in another thread.
   
   You may refer to java impl, https://github.com/apache/skywalking-java/blob/main/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ContextManager.java#L157


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1188547363

   @jmjoy I could start the release, could you update the version declare with e2e dependency?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1173064139

   @lujiajing1126 Could you be more specific what causes the NPE?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1188539616

   > @jmjoy Should we consider a 0.3.0 release? Any other things you may add?
   > 
   > In the future, I think log collecting and meter(Metrics) reports are good choices.
   
   No problem, future changes can be put into 0.4.0.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1172168625

   Do you want to implement `ctx#capture` and `ctx2#continous` in these APIs, which could link ctx and ctx in a whole trace although they are created in two threads originally? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1186216349

   > We only have cross threads left for this issue, right?
   
   Yes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] xiaoniankang commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
xiaoniankang commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1200843846

   > > 也许是一些可视化错误?我不确定这一点。因为这个 span 有两个引用,一个是 RPC peer,另一个是来自本地 span 的 snapshot。
   > > 如果您纯粹想检查捕获和连续性,则所有异步 HTTP 调用或回调都应包括这种情况。
   > 
   > 我已经确认了 9.0.0 和 9.1.0 的问题。
   > 
   > 该问题是由于`EndpointDepFromCrossThreadAnalysisListener`在v9中引入的,在分析过程中抛出了NPE,那么该段将不会被保存到存储中。
   > 
   > ```
   > org.apache.skywalking.oap.server.receiver.trace.provider.handler.v8.grpc.TraceSegmentReportServiceHandler - 75 [grpcServerPool-1-thread-14] ERROR [] - null
   > java.lang.NullPointerException: null
   > 	at org.apache.skywalking.oap.server.core.source.EndpointRelation.prepare(EndpointRelation.java:101) ~[server-core-9.1.0.jar:9.1.0]
   > 	at org.apache.skywalking.oap.server.core.analysis.DispatcherManager.forward(DispatcherManager.java:59) ~[server-core-9.1.0.jar:9.1.0]
   > 	at org.apache.skywalking.oap.server.core.source.SourceReceiverImpl.receive(SourceReceiverImpl.java:36) ~[server-core-9.1.0.jar:9.1.0]
   > 	at org.apache.skywalking.oap.server.analyzer.provider.trace.parser.listener.EndpointDepFromCrossThreadAnalysisListener.lambda$build$0(EndpointDepFromCrossThreadAnalysisListener.java:130) ~[agent-analyzer-9.1.0.jar:9.1.0]
   > 	at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_332]
   > 	at org.apache.skywalking.oap.server.analyzer.provider.trace.parser.listener.EndpointDepFromCrossThreadAnalysisListener.build(EndpointDepFromCrossThreadAnalysisListener.java:124) ~[agent-analyzer-9.1.0.jar:9.1.0]
   > 	at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_332]
   > 	at org.apache.skywalking.oap.server.analyzer.provider.trace.parser.TraceAnalyzer.notifyListenerToBuild(TraceAnalyzer.java:75) ~[agent-analyzer-9.1.0.jar:9.1.0]
   > 	at org.apache.skywalking.oap.server.analyzer.provider.trace.parser.TraceAnalyzer.doAnalysis(TraceAnalyzer.java:71) ~[agent-analyzer-9.1.0.jar:9.1.0]
   > 	at org.apache.skywalking.oap.server.analyzer.provider.trace.parser.SegmentParserServiceImpl.send(SegmentParserServiceImpl.java:40) ~[agent-analyzer-9.1.0.jar:9.1.0]
   > 	at org.apache.skywalking.oap.server.receiver.trace.provider.handler.v8.grpc.TraceSegmentReportServiceHandler$1.onNext(TraceSegmentReportServiceHandler.java:72) [skywalking-trace-receiver-plugin-9.1.0.jar:9.1.0]
   > 	at org.apache.skywalking.oap.server.receiver.trace.provider.handler.v8.grpc.TraceSegmentReportServiceHandler$1.onNext(TraceSegmentReportServiceHandler.java:63) [skywalking-trace-receiver-plugin-9.1.0.jar:9.1.0]
   > 	at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:262) [grpc-stub-1.46.0.jar:1.46.0]
   > 	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(ServerCallImpl.java:318) [grpc-core-1.46.0.jar:1.46.0]
   > 	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:301) [grpc-core-1.46.0.jar:1.46.0]
   > 	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:834) [grpc-core-1.46.0.jar:1.46.0]
   > 	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) [grpc-core-1.46.0.jar:1.46.0]
   > 	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) [grpc-core-1.46.0.jar:1.46.0]
   > 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_332]
   > 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_332]
   > 	at java.lang.Thread.run(Thread.java:750) [?:1.8.0_332]
   > ```
   
   Has the 9.1.0 version of the official website been solved?  I still seem to have this problem with the 9.1.0 tar package I downloaded 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1188547863

   > @jmjoy I could start the release, could you update the version declare with e2e dependency?
   
   OK.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1172321803

   > What is the purpose of `ctx#capture` and `ctx2#continous`? Is there other language can be referenced? I just think it can add a parameter like `TRACING_MANAGER.create_context(parent_context)`.
   
   The parent segment is not a very accurate concept, as there are many spans in current and parent context, you can't know which span of ctx is referring another span in  ctx2.
   
   This doc may help you understanding this concept, https://skywalking.apache.org/docs/skywalking-java/latest/en/setup/service-agent/java-agent/java-plugin-development-guide/#contextsnapshot.
   
   In the protocol, the span's reference doesn't only represent the peer of an RPC/MQ, it also could represent a cross-thread reference.
   
   https://github.com/apache/skywalking-data-collect-protocol/blob/906a834dc0c3fb66719b8313f8f9298be3a27349/language-agent/Tracing.proto#L125-L128
   
   https://github.com/apache/skywalking-data-collect-protocol/blob/906a834dc0c3fb66719b8313f8f9298be3a27349/language-agent/Tracing.proto#L79-L82


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1173029905

   I'm studying `capture` and `continous` through Java Kafka. I've opened `foo` and `bar` consumers, and produced messages through the request of `/mq2`.
   ![image](https://user-images.githubusercontent.com/8677974/177029906-6e35055e-6592-4450-8c0e-bcb7a9d2c443.png)
   
   
   I've determined through breakpoint debugging that the application has called to generate `LocalSpan` of `Kafka/Producer/Callback`.
   ![image](https://user-images.githubusercontent.com/8677974/177029937-8f40a29c-eb38-4ef5-8da0-b6a55b8ca4ed.png)
   
   But I'm confused that `LocalSpan` of `Kafka/Producer/Callback` is not displayed on the interface.
   
   ![image](https://user-images.githubusercontent.com/8677974/177029974-c93c2798-13c4-48dd-a6e6-6ecdf1db0daa.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1173033106

   Maybe some visualization bug? I am not sure about this.
   Because this span has two references, one is RPC peer, the other is from the local span's snapshot. 
   
   If you purely want to check capture and continuous, all async HTTP call or callback should include this case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] lujiajing1126 commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1173239401

   > Yes, I switch to using the old 8.x UI, and the `Kafka/Producer/Callback` is shown.
   
   Hi @jmjoy, the bugfix has been merged to the master branch. You may have a try.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1186138487

   We only have cross threads left for this issue, right?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1188532021

   **Add context capture and continued methods.** through https://github.com/apache/skywalking-rust/pull/29


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1179718466

   Add Tracer: <https://github.com/apache/skywalking-rust/pull/26>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1173053873

   FYI @Fine0830 We may miss mutiple references in the span page in 9.x


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1172258954

   What is the purpose of `ctx#capture` and `ctx2#continous`? Is there other language can be referenced? I just think it can add a parameter like `TRACING_MANAGER.create_context(parent_context)`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1173111422

   Could you send a pull request to fix this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1173044996

   > Maybe some visualization bug? I am not sure about this. Because this span has two references, one is RPC peer, the other is from the local span's snapshot.
   > 
   > If you purely want to check capture and continuous, all async HTTP call or callback should include this case.
   
   Yes, I switch to using the old 8.x UI, and the `Kafka/Producer/Callback` is shown.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1172178304

   > Do you want to implement `ctx#capture` and `ctx2#continous` in these APIs, which could link ctx and ctx in a whole trace although they are created in two threads originally?
   
   OK, let me think about the design of API.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] lujiajing1126 commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1173057480

   > Maybe some visualization bug? I am not sure about this. Because this span has two references, one is RPC peer, the other is from the local span's snapshot.
   > 
   > If you purely want to check capture and continuous, all async HTTP call or callback should include this case.
   
   I've confirmed the issue with both 9.0.0 and 9.1.0.
   
   The issue is caused by `EndpointDepFromCrossThreadAnalysisListener` introduced in v9, NPE is thrown during the analysis , then the segment will not be saved to the storage.
   
   ```
   org.apache.skywalking.oap.server.receiver.trace.provider.handler.v8.grpc.TraceSegmentReportServiceHandler - 75 [grpcServerPool-1-thread-14] ERROR [] - null
   java.lang.NullPointerException: null
   	at org.apache.skywalking.oap.server.core.source.EndpointRelation.prepare(EndpointRelation.java:101) ~[server-core-9.1.0.jar:9.1.0]
   	at org.apache.skywalking.oap.server.core.analysis.DispatcherManager.forward(DispatcherManager.java:59) ~[server-core-9.1.0.jar:9.1.0]
   	at org.apache.skywalking.oap.server.core.source.SourceReceiverImpl.receive(SourceReceiverImpl.java:36) ~[server-core-9.1.0.jar:9.1.0]
   	at org.apache.skywalking.oap.server.analyzer.provider.trace.parser.listener.EndpointDepFromCrossThreadAnalysisListener.lambda$build$0(EndpointDepFromCrossThreadAnalysisListener.java:130) ~[agent-analyzer-9.1.0.jar:9.1.0]
   	at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_332]
   	at org.apache.skywalking.oap.server.analyzer.provider.trace.parser.listener.EndpointDepFromCrossThreadAnalysisListener.build(EndpointDepFromCrossThreadAnalysisListener.java:124) ~[agent-analyzer-9.1.0.jar:9.1.0]
   	at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_332]
   	at org.apache.skywalking.oap.server.analyzer.provider.trace.parser.TraceAnalyzer.notifyListenerToBuild(TraceAnalyzer.java:75) ~[agent-analyzer-9.1.0.jar:9.1.0]
   	at org.apache.skywalking.oap.server.analyzer.provider.trace.parser.TraceAnalyzer.doAnalysis(TraceAnalyzer.java:71) ~[agent-analyzer-9.1.0.jar:9.1.0]
   	at org.apache.skywalking.oap.server.analyzer.provider.trace.parser.SegmentParserServiceImpl.send(SegmentParserServiceImpl.java:40) ~[agent-analyzer-9.1.0.jar:9.1.0]
   	at org.apache.skywalking.oap.server.receiver.trace.provider.handler.v8.grpc.TraceSegmentReportServiceHandler$1.onNext(TraceSegmentReportServiceHandler.java:72) [skywalking-trace-receiver-plugin-9.1.0.jar:9.1.0]
   	at org.apache.skywalking.oap.server.receiver.trace.provider.handler.v8.grpc.TraceSegmentReportServiceHandler$1.onNext(TraceSegmentReportServiceHandler.java:63) [skywalking-trace-receiver-plugin-9.1.0.jar:9.1.0]
   	at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:262) [grpc-stub-1.46.0.jar:1.46.0]
   	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(ServerCallImpl.java:318) [grpc-core-1.46.0.jar:1.46.0]
   	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:301) [grpc-core-1.46.0.jar:1.46.0]
   	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:834) [grpc-core-1.46.0.jar:1.46.0]
   	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) [grpc-core-1.46.0.jar:1.46.0]
   	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) [grpc-core-1.46.0.jar:1.46.0]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_332]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_332]
   	at java.lang.Thread.run(Thread.java:750) [?:1.8.0_332]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng closed issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.
URL: https://github.com/apache/skywalking/issues/9297


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1188532431

   @jmjoy Should we consider a 0.3.0 release? Any other things you may add?
   
   In the future, I think log collecting and meter(Metrics) reports are good choices. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1186138392

    Auto finalize context and span when dropped. https://github.com/apache/skywalking-rust/pull/28


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1172165342

   I think the new api design is (fake code):
   
   ```rust
   use skywalking_rust::context::trace_context::TracingContext;
   use skywalking_rust::reporter::grpc::Reporter;
   use tokio;
   
   static TRACING_MANAGER: Lazy<TracingManager> = Lazy::new(|| TracingManager::default("svc", "ins"));
   
   async fn handle_request(reporter: ContextReporter) {
       let mut ctx = TRACING_MANAGER.create_context();
   
       {
           // Generate an Entry Span when a request
           // is received. An Entry Span is generated only once per context.
           let span = ctx.create_entry_span("operation1").unwrap();
   
           // Something...
   
           {
               // Generates an Exit Span when executing an RPC.
               let span2 = ctx.create_exit_span("operation2").unwrap();
               
               // Something...
   
               // Drop span2 and finalize to ctx.
           }
   
           // Drop span and finalize to ctx.
       }
   
       // Create coroutine to handle async task.
       spawn(async move {
           let mut ctx2 = TRACING_MANAGER.create_context();
   
           {
               let span3 = ctx2.create_entry_span("operation3").unwrap();
   
               // Something...
   
               // Drop span2 and finalize to ctx2.
           }
   
           // Drop ctx2 and send to TRACING_MANAGER.
       });
   
       // Drop ctx and send to TRACING_MANAGER.
   }
   
   #[tokio::main]
   async fn main() {
       let tx = Reporter::start("http://0.0.0.0:11800").await;
   
       // Start server...
   
       // Block to report.
       loop {
           let context = TRACING_MANAGER.receive_context();
           reporter.send(context).await;
       }
   }
   ```
   
   Add the `TracingManager` which should be singleton in the application, to manage the contexts, and use notify mechanism for reporting.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1174760849

   > 
   
   I just tested it and found it to be fixed.
   
   > > Yes, I switch to using the old 8.x UI, and the `Kafka/Producer/Callback` is shown.
   > 
   > Hi @jmjoy, the bugfix has been merged to the master branch. You may have a try.
   
   I just tested it and found it to be fixed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] lujiajing1126 commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1173106318

   > @lujiajing1126 Could you be more specific what causes the NPE?
   
   <img width="1022" alt="image" src="https://user-images.githubusercontent.com/2568208/177045171-110b90ce-43bf-4878-b022-783dbf038b0a.png">
   
   Since `sourceEndpointOwnerServiceName` is not null ("kafka-scenario"), but `sourceEndpointOwnerServiceLayer` is null.
   
   Then, `serviceLayer.isNormal()` will report NPE,
   
   <img width="985" alt="image" src="https://user-images.githubusercontent.com/2568208/177045223-aabd7e0b-8ead-40bf-b282-dc17c7e3269e.png">
   
   I suppose, we miss a line here,
   
   <img width="1039" alt="image" src="https://user-images.githubusercontent.com/2568208/177045352-ab02b257-bd96-4fdf-a563-8e78ef1c903f.png">
   
   We have to add `sourceBuilder.setSourceEndpointOwnerServiceLayer(Layer.GENERAL);` after line 95 just as we have done in the `RPCAnalysisListener.java`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9297: [Feature] About support multi threads and auto finalize for skywalking-rust.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9297:
URL: https://github.com/apache/skywalking/issues/9297#issuecomment-1173111926

   I think this should be set to the owner layer, according to `sourceEndpointOwnerServiceName == null`, right?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org