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

Masatake Iwasaki commented on HTRACE-69:
----------------------------------------

bq. The thing that's being sampled here is not individual spans, but entire 
requests.

It is the case of top level span. Sampler filters the span and its downstream 
in general. I think {{Sampler#next(T info)}} could be used like log level 
switch using its argument.

Requests granular enough in HBase or Impala are possible to result in too many 
spans in HDFS layer.


> Filtering child spans by sampler
> --------------------------------
>
>                 Key: HTRACE-69
>                 URL: https://issues.apache.org/jira/browse/HTRACE-69
>             Project: HTrace
>          Issue Type: New Feature
>            Reporter: Masatake Iwasaki
>            Assignee: Masatake Iwasaki
>
> Trace#startSpan respect the sampler given as argument only when there is no 
> ongoing span (i.e. when creating new root span).
> {code}
>   public static TraceScope startSpan(String description, Sampler<TraceInfo> 
> s, TraceInfo tinfo) {
>     Span span = null;
>     if (isTracing() || s.next(tinfo)) {
> {code}
> Adding API starting span if {{(isTracing() && s.next(tinfo))}} enables 
> filtering of child spans.



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

Reply via email to