You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@htrace.apache.org by "Sean Busbey (JIRA)" <ji...@apache.org> on 2015/12/08 02:33:10 UTC

[jira] [Commented] (HTRACE-317) Docs for adding tracing to an application are incorrect

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

Sean Busbey commented on HTRACE-317:
------------------------------------

Additionally, the docs say to create a Tracer via the builder with a conf in the constructor:

{code}
Tracer tracer = new Tracer#Builder(conf).setName("MyApp").build();
{code}

The builder only has two constructors: a deprecated no-args and one that takes the name. So this example should use {{Builder("MyApp").conf(conf).build()}}.

> Docs for adding tracing to an application are incorrect
> -------------------------------------------------------
>
>                 Key: HTRACE-317
>                 URL: https://issues.apache.org/jira/browse/HTRACE-317
>             Project: HTrace
>          Issue Type: Bug
>          Components: docs
>    Affects Versions: 4.0.1
>            Reporter: Sean Busbey
>            Priority: Critical
>
> The docs for adding tracing state:
> {code}
> Span computationSpan = tracer.newScope("Expensive computation.");
> try {
>     //expensive computation here
> } finally {
>     computationSpan.stop();
> }
> {code}
> the {{tracer.newScope}} method returns a TraceScope object. That object has a {{close}} method, not {{stop}}.



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