3

I am trying to work on a Poc for creating a sleuth application for our project for logging with Spring mvc i.e, without Spring Boot. I am not able to find my docs/material on the web for mvc.

So, how can I create the Tracer, span bean and inject the logger for logging?

Pablo Matias Gomez
  • 6,614
  • 7
  • 38
  • 72
Jameel
  • 37
  • 2

1 Answers1

3

There's no such a doc / material since it's very difficult to achieve this. You can theoretically just import all configurations that we're using but I wouldn't count on this to work.

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32
  • Has anything changed with this recently? I want to do the same. – yngwietiger Jan 16 '18 at 20:44
  • You can use Brave directly. We're also working on adding Brave support in this issue (https://github.com/spring-cloud/spring-cloud-sleuth/issues/711) so we will have more features ready. All in all I think you should use Brave in your project and then if you add Spring Boot one day you will have everything work out of the box. – Marcin Grzejszczak Jan 16 '18 at 20:49
  • I tried adding all the beans from brave defined here https://github.com/openzipkin/brave/blob/master/spring-beans/README.md, but it is not working. Does it need some more config, but defining this beans. Or has something changed recently, regarding sleuth to support this. – xMilos Nov 08 '22 at 21:18
  • You can now use Micrometer Tracing https://micrometer.io/docs/tracing to set things up if you're interested. We also describe how to use Micrometer Observation API to get metrics and tracing with a single instrumentation – Marcin Grzejszczak Nov 09 '22 at 12:49