4

I am trying to run a Spring Boot application and trace its execution with the support of Sleuth. The log shows the service name, but nothing for the trace id or the span id. All I get is [myservice,,,].

What am I missing?

Here are some lines from the log.

2017-04-30 14:41:38.750 INFO [myservice,,,] 7 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5e57643e: startup date [Sun Apr 30 14:41:38 GMT 2017]; root of context hierarchy

2017-04-30 14:41:39.264 INFO [myservice,,,] 7 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring

...

Thanks

Community
  • 1
  • 1
msayag
  • 8,407
  • 4
  • 30
  • 29
  • 3
    This is normal for startup. Sleuth is for distributed tracing. I.e. ingress and egress points from say an HTTP REST call or some MQ. – Darren Forsythe Apr 30 '17 at 15:05

1 Answers1

6

Like Darren mentioned this is perfectly normal. What would you want to trace here? A trace is started by an rpc call or sth like that. Please read the docs where you can read about what distributed tracing is and you can watch my video where I explain how to use Sleuth

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32
  • How is this normal? This link just returns "Hello World" and does some logging and he gets traceId and spanId. https://www.baeldung.com/spring-cloud-sleuth-single-application – Heisenberg Oct 15 '18 at 16:34
  • 2
    Because in the link you have `logger.info("Hello Sleuth");` and @msayag has logged nothing – Marcin Grzejszczak Oct 15 '18 at 16:35
  • 1
    Ah, ok. But it doesn't start on RPC or I/O call. I use it within single service as well. – Heisenberg Oct 15 '18 at 16:50