[ 
https://issues.apache.org/jira/browse/HTRACE-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15258657#comment-15258657
 ] 

Colin Patrick McCabe commented on HTRACE-359:
---------------------------------------------

One thing that might confuse users is that the API here for {{public <V> 
Callable<V> wrap(Callable<V> callable, String description, SpanId parentId)}} 
is different than the existing {{newScope}} API.  If there is an existing trace 
scope and a span ID was also passed, the {{newScope}} API will add both as 
parents of the new span (if a span is created), whereas this API just adds the 
pass-in span ID.  We should carefully document this in the JavaDoc.

Currently the JavaDoc for wrap is misleading:
{code}
   * @param parentId     If this is a valid span ID, it will be added to
   *                     the parents of the new span we create.
{code}

> TraceRunnable and TraceCallable should be built using parent spanId not scope
> -----------------------------------------------------------------------------
>
>                 Key: HTRACE-359
>                 URL: https://issues.apache.org/jira/browse/HTRACE-359
>             Project: HTrace
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 4.0
>            Reporter: Mike Drob
>            Assignee: Mike Drob
>         Attachments: HTRACE-359.patch.txt, HTRACE-359.patch.txt, 
> HTRACE-359.v3.patch.txt
>
>
> TraceRunnable/Callable both take a parent TraceScope and extract the span Id 
> from it when executing the task. Instead, we should allow users to create 
> custom TraceRunnable/Callable instances with only a SpanId instead of a full 
> TraceScope, for instance when reading a span id from an RPC call and a 
> TraceScope object is not available.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to