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 2018/05/09 15:17:18 UTC

[GitHub] wu-sheng opened a new issue #1200: [New concept] Proposal for Manual Span

wu-sheng opened a new issue #1200: [New concept] Proposal for Manual Span
URL: https://github.com/apache/incubator-skywalking/issues/1200
 
 
   Consider of #1196 and #1044 , also more and more RPC framework, I want to proposal a new type of span, Concept: **Manual Span**
   
   # Manual Span
   Manual span is not following the tracing context's stack based management, when the span created, it will not be added into the stack, instead, the creator is in charge of their life cycle.
   
   ## Span in the stack
   All existed spans in current stack management will not be effect by the manual span. The manual span's parent will be the active span in the stack if existed.
   
   ## Create the child of manual span
   There should be two ways to create the child spans, new APIs should be provided.
   1. Create another manual span by given manual span. 
   1. Create a traditional(Entry, Exit or Local) span, and use `span#setParent` to override its default parent.
   
   ## Cross thread
   Even manual span could deal some cross thread scenario, but it definitely doesn't fit all. So ACROSS_THREAD ref has its duty. Please don't consider use this to replace it.
   
   The difference between manual span and cross thread is
   - Manual span for recording duration, op and event cross thread, but with in a single plugin or framework.
   - Cross thread ref is about context propagation, new tracing context created.
   
   In many manual instrument SDK, such as Zipkin, these two are the same thing. But SkyWalking is an auto instrument agent, so no context can propagate manually or explicitly. That is a big diff.
   
   ## TracingContext finish event
   TracingContext finish event based on active span stack, if support Manual Span concept, we should provide a TracingContext half-finished buffer for hold the segments, and wait for the all manual spans in the context notify they finished.
   
   ## For backend
   The sequence of spans in segment will be more unreliable. You can't count on that, only the parent-child relationship could be trust. 
   
   This is my new proposal for SkyWalking 5.1 . This will be a big change, and any plugin use this mechanism should be careful. 
   
   I hope we should discuss on this. I definitely believe it may help plugin implementor for async framework.
   
   FYI @liuhaoyang @candyleer @ascrutae 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services