I am following the tutorial for creating tracing application zipkin
and sleuth
but I am having some trouble. I cannot create a span. The problem is that the method does not exist. Also I cannot find the import for the tracer.
This is what I am trying to do:
import org.springframework.cloud.sleuth.Tracer;
@Component
public class Test {
@Autowired
Tracer tracer;
public void test (){
Span newSpan = tracer.createSpan("test");
//business logic
tracer.close(newSpan);
}
}
Why is the implementation above not working?