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

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

Thanks for giving the example.  I agree, you should not create an extra scope 
just to be able to use this convenience method.  This would be bad for other 
reasons as well... you would be creating an extra trace span which doesn't 
serve any purpose.  Remember, you should minimize the number of trace spans you 
are creating-- make each one meaningful and useful so that users can look at 
traces and see what's going on.

I guess we could add another {{Tracer#wrap}} method which took a {{SpanId}} in 
addition to the {{Callable}} and description.  This essentially would match the 
two {{Tracer#newScope}} overloads.

> TraceRunnable and TraceCallable should store 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
>
>
> 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