[
https://issues.apache.org/jira/browse/HTRACE-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14387167#comment-14387167
]
Colin Patrick McCabe commented on HTRACE-69:
--------------------------------------------
bq. The problem I would like to solve here is that Trace#startSpan never
respect sampler if there is ongoing trace (i.e. Trace.isTracing() returns
true). You can not adjust sampling rate of traces in
DFSInputStream/DFSOutputStream if you do end-to-end tracing from HBase.
Correct. The thing that's being sampled here is not individual spans, but
entire requests. We either sample all of an entire request, or none of it. I
believe this is exactly what we should be doing. It doesn't help to have a
bunch of fragmented pieces of a request. We can get that now, without using
HTrace, just by looking at logs. We have to be able to see the entire request,
from start to finish.
There are some things that are too chatty right now... I guess that's partly my
fault. I think the solution to those is to adjust those things so that they're
not so chatty, but still provide the essential information.
We also need to make sure our request granularity makes sense. i.e. a full
table scan in Impala should not be a single "request" from htrace's point of
view because it is just too big. There are probably also operations in HBase
that need to be split up in similar ways.
> 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)