When I I print the traceId I get 514775860170850477 however in the logs the trace id is 724d9eadc6e00ad. Any idea what could be happening here?
My pom
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
How I print the traceId
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Service;
@Service
public class ValidationService{
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private Tracer tracer;
public void someMethod(){
System.out.println(tracer.getCurrentSpan().getTraceId());
logger.info("ValidationService someMethodEntered " +);
}}