[
https://issues.apache.org/jira/browse/HTRACE-275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14942575#comment-14942575
]
Colin Patrick McCabe commented on HTRACE-275:
---------------------------------------------
Thanks for reviewing... and thanks for the original idea. I guess the
rationale for having {{NullTracer#addSampler}} fail is that it seems like
something the programmer should not be doing. In general, the
{{Tracer#addSampler}} method is a "power" method, only used by power users like
Hadoop that want to change the samplers that are active at runtime. I guess
logging an ERROR message is one alternative to throwing an exception, but I
feel like an exception might be appropriate here, since we're not able to do
the thing that was requested.
In general, I'm kind of concerned that NullTracer could hide errors where we
actually didn't initialize the Tracer, and we thought we did. Perhaps
NullTracer should log a debug message when it's used, to indicate that we
didn't initialize things in the order we thought? Hmm...
> 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)