I am trying to use sleuth and Zipkin in a demo spring boot application.
I have added the required dependency in pom.xml and in order to export the details from sleuth to Zipkin, I have explicitly defined it below in application.properties. However, the default value is any way true.
spring.zipkin.enabled=true
But the export flag is not coming as true always, and hence the request meta info is not getting exported to Zipkin for each request I am hitting from the postman.
2022-11-02 13:46:31.099 INFO [demo3,def8e3343c003e5b,def8e3343c003e5b,true] 5678 --- [nio-9096-exec-2] c.t.d.c.UserOperationController : hello world !!
2022-11-02 13:46:32.402 INFO [demo3,699027e047256ffe,699027e047256ffe,false] 5678 --- [nio-9096-exec-3] c.t.d.c.UserOperationController : hello world !!
2022-11-02 13:46:49.732 INFO [demo3,3ff7224335d16add,3ff7224335d16add,false] 5678 --- [nio-9096-exec-4] c.t.d.c.UserOperationController : hello !!
2022-11-02 13:47:03.246 INFO [demo3,fe1532a4c9d1658c,fe1532a4c9d1658c,true] 5678 --- [nio-9096-exec-5] c.t.d.c.UserOperationController : hello !!
2022-11-02 13:47:31.545 INFO [demo3,8669a3fdb484934b,8669a3fdb484934b,false] 5678 --- [nio-9096-exec-6] c.t.d.c.UserOperationController : hello !!
2022-11-02 13:47:47.479 INFO [demo3,b2bcd756ca4e8014,b2bcd756ca4e8014,false] 5678 --- [nio-9096-exec-7] c.t.d.c.UserOperationController : hello world !!
2022-11-02 13:47:58.467 INFO [demo3,a1d97721b926bdc0,a1d97721b926bdc0,false] 5678 --- [nio-9096-exec-8] c.t.d.c.UserOperationController : hello world !!
2022-11-02 13:48:01.102 INFO [demo3,1b9af943d513d8b6,1b9af943d513d8b6,false] 5678 --- [nio-9096-exec-9] c.t.d.c.UserOperationController : hello world !!
2022-11-02 13:48:03.894 INFO [demo3,1db119acd65e0add,1db119acd65e0add,false] 5678 --- [io-9096-exec-10] c.t.d.c.UserOperationController : hello world !!
Note that, I have defined two apis in UserOperationController as below:
@GetMapping("/view")
public List<AuditDetailsResponse> viewAll() {
logger.info("hello world !!");
return userOperationService.viewAll();
}
@GetMapping("/view/{username}")
public AuditDetailsResponse view(@PathVariable("username") String username) {
logger.info("hello !!");
return userOperationService.view(username);
}
Could anyone help me to understand how this export flag is actually working and how I can make this value as true always?