My question is similar to the below thread,
http://apache-hbase.679495.n3.nabble.com/HTrace-td4056705.html

I have enabled htrace logging on server side using the below configuration
in hbase-site.xml

<property>
        <name>hbase.trace.spanreceiver.classes</name>
        <value>org.cloudera.htrace.impl.LocalFileSpanReceiver</value>
</property>

<property>
        <name>hbase.local-file-span-receiver.path</name>
        <value>/tmp/Server_htrace.out</value>

On the client side, I maintain a different configuration file
hbase-client.xml

<property>
        <name>hbase.trace.spanreceiver.classes</name>
        <value>org.cloudera.htrace.impl.LocalFileSpanReceiver</value>
</property>

<property>
        <name>hbase.local-file-span-receiver.path</name>
        <value>/tmp/Client_htrace.out</value>

I am able to see the htrace spans when I start/close spans using the hbase
shell.
However, when I start and close span in my client side code, I see only the
server side span traces without the root parent span that is initiating the
server rpc calls.

Here is how I made changes to the client side code:

 this.spanReceiverHost = SpanReceiverHost.getInstance(conf);

I have initialized the spanReceiverHost like above. The conf is
hbase-client.xml here.

Then before a "Get" call I have done a start and close of trace:

        TraceScope ts = Trace.startSpan("Gets", Sampler.ALWAYS);
        try {
            result = getTable(table).get(g);
        }
        catch (IOException e) {
            throw new DatabaseException("Error fetching data: "
                    + e.getMessage());
        }
        finally {
            if (ts != null) {
                ts.close();
            }  
        }

For all the gets I see spans from the server side but no span with "Gets" in
the description. I cannot make a graph out of the spans since it is missing
the parent span.

Am I missing something? It will be great if someone could help me on this. I
have one region server, one master running in my environment and I am using
hbase-0.98.8





--
View this message in context: 
http://apache-hbase.679495.n3.nabble.com/Htrace-spans-not-generated-for-hbase-client-side-code-tp4073462.html
Sent from the HBase User mailing list archive at Nabble.com.

Reply via email to