I have an api that has several methods. The workflow of the api call is in general like this: login, callX, … and logout. Each api method is doing calls to subsystems. The trace id with sleuth works for e.g. the login call and all it’s subsystems. Now i would like to have a trace id that is the sa…
Tag: spring-cloud-sleuth
How to get trace id and span id in the log4j2, in the format [traceId, spanId ]?
How to get trace id and span id in the log4j2, not the in the [traceId, spanId ] ? Expected Output : [APPNAME,5a59b2372d9a3814,5a59b2372d9a3814] Actual Output : [logLevel=ERROR] — 2021-01-21 11:30:32,489 +0530 — http-nio-8080-exec-1 com.springboot.test.aspect.MyAspect — asnId= – messag…
RestTemplate logging interceptor + Spring Cloud Sleuth
I’ve created a RestTemplate interceptor (ClientHttpRequestInterceptor) to log requests and responses and enabled Spring Cloud Sleuth with the goal of tracing transactions from when the interceptor receives a request to the point where it returns a result. However, Sleuth’s trace and span ids do no…
Disable Spring Cloud Sleuth when running Integration Tests?
When using org.springframework.cloud:spring-cloud-gcp-starter-trace:1.0.0.RELEASE and running my integration tests locally I get this error message: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘stackdriverSender’ defined in class path resource [org/spring…