Skip to content
Advertisement

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= – message=”Logging key:”, traceId=f19556b82d98bf86, executionTimeSeconds=23 My log4j2 : tried adding below commented property but not seeing trace id in logs Aspect class : In

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 not appear in the interceptors log messages; it seems they are only at a later stage

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/springframework/cloud/gcp/autoconfigure/trace/StackdriverTraceAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [zipkin2.reporter.Sender]: Factory method ‘stackdriverSender’ threw exception; nested exception is java.io.IOException: The Application Default Credentials are not available. They are available

Advertisement