[
https://issues.apache.org/jira/browse/HTRACE-275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14942772#comment-14942772
]
Masatake Iwasaki commented on HTRACE-275:
-----------------------------------------
bq. Perhaps NullTracer should log a debug message when it's used, to indicate
that we didn't initialize things in the order we thought?
NullTracer should be used only when it is hard to make sure that Tracer is
initialized in every code path, like {{FileSystem}} implementations in Hadoop.
Users of {{Tracer#getNullTracer}} must be aware of it and I think noticing in
documentation is enough. Once it is used, it could not be said to be always
exceptional.
bq. 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.
Based on the fact that users of {{Tracer#getNullTracer}} must be aware of it's
usecase, I think it is ok to throw exception in {{addSampler}} now. +1 on 001.
> 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)