0

I am working in a project which uses scala and twitter server finagle. Our project's requirement has logging and tracing. While searching, I came across sleuth and zipkin. I am able to integrate zipkin as I found library for finagle but couldn't find any sleuth related library. I have looked into the documentation of sleuth but it only relate to spring. So my question is has anybody used sleuth in other than spring? Is it possible? If anybody has then could you provide documentation or example.

1 Answers1

1

Spring Cloud Sleuth is part of Spring Cloud, it does the followings:

  • Provides an abstraction (API) above tracing libraries
  • Instruments other Spring projects and other third-party dependencies

Based on this, the answer for your questions:

Could we use sleuth without spring cloud?

Yes, you can use Spring Cloud Sleuth without using other Spring Cloud projects, there are common things (spring-cloud-commons) that you will get but you don't need to use the other Spring Cloud projects.

has anybody used sleuth in other than spring? Is it possible?

Since Spring Cloud Sleuth is part of the Spring portfolio it was made to work with Spring, while you might be able to hack it and reuse things from spring-cloud-sleuth-api and spring-cloud-sleuth-brave it was not made for this use-case, Spring Cloud Sleuth was made to work with Spring applications.

I would recommend taking a look at OpenZipkin's Brave, it's a tracing library that you can use to instrument your codebase, Sleuth is using it by default.

Jonatan Ivanov
  • 4,895
  • 2
  • 15
  • 30