spring-cloud-sleuth icon indicating copy to clipboard operation
spring-cloud-sleuth copied to clipboard

Make Zipkin timeout configurable

Open eduanb opened this issue 2 years ago • 2 comments

Currently connecting to Zipkin has a hardcoded 1-second timeout, which for me isn't long enough. When I connect to a Zipkin server behind a VPN from my local PC on the other side of the world this times out.

The workaround that I did now was to create my own Reporter bean. This would have been much simpler if it was just a config property, like the message timeout.

I'll create a PR if the team thinks this is a good feature to add.

eduanb avatar Sep 29 '21 17:09 eduanb

Makes sense, please file a pr :)

marcingrzejszczak avatar Sep 30 '21 08:09 marcingrzejszczak

This hardcoded 1-second timeout means that there's a pre-check on the sender, and that check has a timeout of one second. If this check fails, it appears that only a WARN log will be printed. Is it necessary to specifically make this timeout configurable?

If you are using the default sender, which use RestTempalte. It looks like prior to version 3.1.0, RestTemplate had a hardcoded connect&read timeout of 500 milliseconds (You do need to create your own Reporter), but after 3.1.0 provides ZipkinRestTemplateProvider, you can inject your custom RestTemplate.

zysaaa avatar Nov 03 '21 02:11 zysaaa

Please upgrade to Micrometer Tracing. Spring Cloud Sleuth is feature complete and out of OSS support.

marcingrzejszczak avatar Feb 09 '24 13:02 marcingrzejszczak