Implement mechanism to apply custom api path (#1859)

* Implement mechanism to apply custom api path to the sleuth server baseUrl.
This comes in handy when another monitoring tool is being used, for instance new relic, which doesn't not require path in its tracing api.

* Fix up documentation on the ZipkinProperties

* Update the main documentation for api path

* Add missing comma
This commit is contained in:
Maziz
2021-02-27 17:16:46 +08:00
committed by GitHub
parent 2e902a7fec
commit 10ff66372e
6 changed files with 118 additions and 7 deletions

View File

@@ -1050,6 +1050,13 @@ If you want to find Zipkin through service discovery, you can pass the Zipkin's
spring.zipkin.baseUrl: https://zipkinserver/
----
By default, api path will be set to `api/v2/spans` or `api/v1/spans` depending on the encoder version. If you want to use a custom api path, you can configure it using the following property (empty case, set ""):
[source,yaml]
----
spring.zipkin.apiPath: v2/path2
----
To disable this feature just set `spring.zipkin.discoveryClientEnabled` to `false.
When the Discovery Client feature is enabled, Sleuth uses