Added more explicit Tracer explanation

without this change it could be nonclear where Tracer comes from and how you can use it.

With this change hopefully it get properly explained

fixes #402
This commit is contained in:
Marcin Grzejszczak
2016-09-13 14:34:48 +02:00
parent 4c3ca67235
commit f00585a7d4

View File

@@ -73,7 +73,7 @@ This approach may change in the future towards being lazy on this matter.
== Span lifecycle
You can do the following operations on the Span by means of *Tracer* interface:
You can do the following operations on the Span by means of *org.springframework.cloud.sleuth.Tracer* interface:
- <<creating-and-closing-spans, start>> - when you start a span its name is assigned and start timestamp is recorded.
- <<creating-and-closing-spans, close>> - the span gets finished (the end time of the span is recorded) and if
@@ -84,6 +84,8 @@ one that it continues.
- <<continuing-spans, detach>> - the span doesn't get stopped or closed. It only gets removed from the current thread.
- <<creating-spans-with-explicit-parent, create with explicit parent>> - you can create a new span and set an explicit parent to it
TIP: Spring creates the instance of `Tracer` for you. In order to use it all you need is to just autowire it.
=== Creating and closing spans [[creating-and-closing-spans]]
You can manually create spans by using the *Tracer* interface.