Added property for overriding the service name in Zipkin

without this only either service discovery service id / spring.application.name can be chosen as a service name for zipkin
    with this change you can pass spring.zipkin.service.name property to change override that both for HTTP and Stream collectors

    fixes #324
This commit is contained in:
Marcin Grzejszczak
2017-01-02 10:18:20 +01:00
parent 24f6827a4a
commit 225a2d4cbf
14 changed files with 247 additions and 39 deletions

View File

@@ -285,6 +285,19 @@ include::../../../..//spring-cloud-sleuth-zipkin/src/test/java/org/springframewo
IMPORTANT: Remember not to add both `peer.service` tag and the `SA` tag! You have to add only `peer.service`.
=== Custom service name
By default Sleuth assumes that when you send a span to Zipkin, you want the span's service name
to be equal to `spring.application.name` value. That's not always the case though. There
are situations in which you want to explicitly provide a different service name for all spans coming
from your application. To achieve that it's enough to just pass the following property
to your application to override that value (example for `foo` service name):
[source,yaml]
----
spring.zipkin.service.name: foo
----
== Span Data as Messages
You can accumulate and send span data over