The @ContinueSpan annotation will continue an existing span, wrapping the method call or reactive type.

2

The @SpanTag annotation can be used on method arguments to include the value of each argument within a Span’s tags. When you use @SpanTag you need either to annotate the method with @NewSpan or @ContinueSpan

3.5 Book Recommendation

Modify build.gradle to add tracing dependency.

bookrecommendation/build.gradle

dependencies {
...
..
.
compile "io.micronaut:micronaut-tracing"
}

Also, to send tracing spans to Zipkin the minimal configuration requires you add the following dependencies to build.gradle:

In the previous image, you can see the requests to bookinventory are done in paralell.

You can see the details if you click the span:

In the previous image, you can see that:

Whenever a Micronaut HTTP client executes a new network request, a span is involved.

Whenever a Micronaut Server receives a request, a span is involved.

The stock.isbn tags that we configured with @SpanTag is present as shown in the next image:

5 Next Steps

As you have seen in this tutorial, without any annotations you get distributing tracing up-and-running fast with Micronaut.

Micronaut includes several annotations to give you more flexibility. We introduced the @ContinueSpan, @SpanTag annotations. Also, you have at your disposal the @NewSpan annotation which will create a new span, wrapping the method call or reactive type.