Deprecates SpanAdjuster for Brave's FirehoseHandler

Brave's `FirehoseHandler` has the features adjuster has, more
efficiently and also including the ability to prune spans.

See https://github.com/openzipkin/brave/pull/794
This commit is contained in:
Adrian Cole
2018-09-24 22:33:24 -04:00
committed by Adrian Cole
parent 390473a60e
commit 7b5d530c80
7 changed files with 124 additions and 24 deletions

View File

@@ -880,17 +880,17 @@ spring.zipkin.service.name: myService
=== Customization of Reported Spans
Before reporting spans (for example, to Zipkin) you may want to modify that span in some way.
You can do so by using the `SpanAdjuster` interface.
You can do so by using the `FinishedSpanHandler` interface.
In Sleuth, we generate spans with a fixed name.
Some users want to modify the name depending on values of tags.
You can implement the `SpanAdjuster` interface to alter that name.
You can implement the `FinishedSpanHandler` interface to alter that name.
The following example shows how to register two beans that implement `SpanAdjuster`:
The following example shows how to register two beans that implement `FinishedSpanHandler`:
[source,java]
----
include::../../../..//spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/SpanAdjusterTests.java[tags=adjuster,indent=0]
include::../../../..//spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/FinishedSpanHandlerTests.java[tags=finishedSpanHandler,indent=0]
----
The preceding example results in changing the name of the reported span to `foo bar`, just before it gets reported (for example, to Zipkin).