[
https://issues.apache.org/jira/browse/HTRACE-261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15049268#comment-15049268
]
stack commented on HTRACE-261:
------------------------------
I changed the subject from 5.0 API changes to API changes. Most of the below
are additive and we can deprecate current methods in favor of the new ones.
The below came up again in my recent interaction with htrace API
Why not a Tracer.getCurrentTracerScope? We create Scopes rather than Spans. If
I want to add an annotation or timeline note, I have to get current span
instead to do it (unless the scope is available in the current context because
this is where I created it...).
So when Span and when Scope? If we added above (and being able to add parents
to scope) we could foreground in doc Scope as object to manipulate in user doc
and in API.
> API improvements
> ----------------
>
> Key: HTRACE-261
> URL: https://issues.apache.org/jira/browse/HTRACE-261
> Project: HTrace
> Issue Type: Improvement
> Components: api, core
> Affects Versions: 4.0
> Reporter: stack
>
> The 4.0.0 is much better than 3.x API but a few holes. Here is an umbrella
> issue to keep track of API improvements to do for htrace 5.0
> detach and reattach should return this. Ditto on the annotations.
> curThreadTracer should be currentThreadTracer or getCurrentThreadTracer
> Have to do too much checking for null when using the 4.0 API; e.g. checking
> if tracer is null.
> In 3.x, there was an isTracing but now you have to get Span from Scope and if
> it is null, then you know you are not tracing... not as obvious as isTracing.
> TraceScope is meant as the Tracing Interface; it hides Spans. Its coverage is
> not complete though. For example, to add a Parent, you have to get the Span
> from the Scope and add the Parent there.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)