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

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

What I like about the current patch is that we could remove the {{NullTracer}} 
class entirely and clients wouldn't know.  For example, we could switch to 
having a boolean inside the tracer to determine whether it traced, or whatever. 
 In the patch, {{NullTracer}} is purely an implementation detail rather than 
part of the API.  To me this feels cleaner than exposing the {{NullTracer}} 
class.  What feels dirty to me about {{NullTracer}} is that it feels kind of 
like a "fudge" to handle code that doesn't initialize itself properly.  Maybe 
once we add tracing to a few more things we'll have more perspective on this 
and whether it's really necessary.

> Add NullTracer which never creates a trace span
> -----------------------------------------------
>
>                 Key: HTRACE-275
>                 URL: https://issues.apache.org/jira/browse/HTRACE-275
>             Project: HTrace
>          Issue Type: Improvement
>          Components: api
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HTRACE-275.001.patch
>
>
> [~iwasakims] suggested adding a {{NullTracer}} which never creates a trace 
> span.  This would be more convenient than checking tracer objects against 
> null in some cases.



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

Reply via email to