0

spring-cloud-sleuth provides way to trace method execution with @NewSpan

As it is annotation it is not feasible to add annotation on all methods of project.

Also, in production environment we only need to trace the method execution time once we find latency in execution.

Is there any way to enable tracing for Method calls at run time without restarting application?

Nitul
  • 997
  • 12
  • 35
  • Your question is very specific. If you can break it down into simpler questions and explain the context thoroughly, that should be helpful. – troymyname00 Dec 27 '17 at 08:43

1 Answers1

1

Nothing comes out of the box for such an approach. What you can do though, is to register your own implementation of the SpanReporter. In that implementation, you could retrieve the duration for a Span and then, depending on its value, either send it to Zipkin or not (or do something else about it).

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32