In this blog, we are going to understand the Microservices Distributed Tracing using Zipkin and Spring Cloud Sleuth framework. Lets take a look at a simple example having two microservices which use Spring Cloud Sleuth to trace a request.
In this working example we will learn the following features:
Here is the high level application’s architecture with Spring Cloud Sleuth and Zipkin UI integration.
Complex microservices architecture have downstream and upstream dependencies with other microservices and everything is interconnected. Most of the time individual team just focus on their own services, so in microservices distributed environment it’s very difficult to find any latency or trace the actual issues at runtime.
Note: Distributed tracing provides a holistic view of requests transiting through multiple services, allowing for immediate identification of issues.
Span – A span is an individual operation.
Trace – A Trace is an end-to-end latency graph, composed of spans.
Tracers – Tracers records spans and passes context required to connect them into a trace.
Spring Cloud Sleuth adds two types of IDs to our logging trace ID and span ID.
2021-07-10 22:42:37.104 INFO [m1-microservice-sleuth,17d289509b6aea0,17d289509b6aea0,true] 13220 --- [nio-8080-exec-1] .m.s.r.SleuthCommonsRequestLoggingFilter : Before request [uri=/1007?port=8090]
The portion of the log statement that Sleuth adds is [m1-microservice-sleuth,17d289509b6aea0,17d289509b6aea0,true]
What do all these values mean?
The first part (m1-microservice-sleuth) is the application name (whatever we set spring.application.name to in application.yml).
The second value (17d289509b6aea0) is the trace ID.
The third value (17d289509b6aea0) is the span ID.
Finally the last value (true) indicates whether the span should be exported to Zipkin.
If we want to see timing information like how long a request took from one microservice to the next that is quite a pain to do yourself. But we have Zipkin tool that we can use for getting these information in a graphical form (GUI).
Basically, it collects tracing information and display on GUI.
In addition we need to tell our application how often we want to sample our logs to be exported to Zipkin. Since this is a demo, lets tell our application that we want to sample everything. We can do this by creating a bean for the AlwaysSampler. We need to add the following code to our @SpringBootApplication (m1-microservice-sleuth and m2-microservice-sleuth) classes.
@Bean
public AlwaysSampler defaultSampler() {
return new AlwaysSampler();
}
High level Project Structure would be looked like as below.
Java 8
Maven 3.5.0
Spring Boot
Eclipse
Spring Cloud Sleuth
Spring Cloud Zipkin
Spring Boot Rest API
Maven file (pom.xml) would be looked like as below.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>microservice-server-zipkin</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>microservice-server-zipkin</name>
<description>Demo project for Spring Boot Zipkin</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-server</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-ui</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.SR4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Application’s port needs to be configured in application.yml
server:
port: 9090
We need to enable ZipkinServer in SpringBootApplication class as below.
package com.the.basic.tech.info.microservice.server.zipkin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import zipkin.server.EnableZipkinServer;
@EnableZipkinServer
@SpringBootApplication
public class ZipkinServerApplication {
public static void main(String[] args) {
SpringApplication.run(ZipkinServerApplication.class, args);
}
}
Maven file (pom.xml) would be looked like as below.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>m1-microservice-sleuth</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>m1-microservice-sleuth</name>
<description>Demo project for Spring Boot Sleuth M1</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.SR4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Application’s port needs to be configured in application.yml
server:
port: 8080
spring:
application:
name: m1-microservice-sleuth
sleuth:
sampler:
percentage: 1
zipkin:
baseUrl: http://localhost:9090
logging:
level:
org.springframework.web.servlet.DispatcherServlet: DEBUG
package com.the.basic.tech.info.m1.microservice.sleuth;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.sleuth.sampler.AlwaysSampler;
import org.springframework.context.annotation.Bean;
@SpringBootApplication
public class SleuthExampleServiceApplication {
@Bean
public AlwaysSampler defaultSampler() {
return new AlwaysSampler();
}
public static void main(String[] args) {
SpringApplication.run(SleuthExampleServiceApplication.class, args);
}
}
We need to apply logging filter as below.
package com.the.basic.tech.info.m1.microservice.sleuth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import com.the.basic.tech.info.m1.microservice.sleuth.rest.SleuthCommonsRequestLoggingFilter;
import javax.servlet.Filter;
@Configuration
public class Config {
@Bean
RestTemplate getRestTemplate() {
return new RestTemplate();
}
@Autowired
private Tracer tracer;
@Bean
public Filter logFilter() {
SleuthCommonsRequestLoggingFilter filter = new SleuthCommonsRequestLoggingFilter();
filter.setIncludeQueryString(true);
filter.setIncludePayload(true);
filter.setMaxPayloadLength(5120);
return filter;
}
}
package com.the.basic.tech.info.m1.microservice.sleuth.rest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
@RestController
public class HomeController {
@Autowired
private RestTemplate restTemplate;
@RequestMapping("/{sleepInMillis}")
public String callSleep(@RequestParam("port") int port, @PathVariable int sleepInMillis, @RequestParam(value = "message", defaultValue = "Good morning") String message) {
SleepRequest sleepRequest = new SleepRequest(sleepInMillis, message);
SleepResponse sleepResponse = restTemplate.postForObject("http://localhost:" + port + "/sleep", sleepRequest, SleepResponse.class);
return "Service at port " + port + " was sleeping for : " + sleepInMillis + " until " + sleepResponse.getDate();
}
}
package com.the.basic.tech.info.m1.microservice.sleuth.rest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
@RestController
public class SleepController {
private Logger logger = LoggerFactory.getLogger(SleepController.class);
@Autowired
private Tracer tracer;
@RequestMapping(value = "/sleep", method = RequestMethod.POST)
public SleepResponse sleep(@RequestBody SleepRequest sleepRequest) {
logger.info(sleepRequest.getMessage());
sleep(sleepRequest.getSleepInMillis() / 2);
sleep(sleepRequest.getSleepInMillis() / 2);
return new SleepResponse(sleepRequest.getMessage(), new Date());
}
private void sleep(int sleepInMillis) {
Span span = tracer.createSpan("This span was created programmatically, sleep " + sleepInMillis);
try {
span.tag("sleepInMillis", "" + sleepInMillis);
logger.info("sleepInMillis " + sleepInMillis);
try {
Thread.sleep(sleepInMillis);
} catch (InterruptedException e) {
e.printStackTrace();
}
} finally {
tracer.close(span);
}
}
}
package com.the.basic.tech.info.m1.microservice.sleuth.rest;
public class SleepRequest {
private int sleepInMillis;
private String message;
public SleepRequest() {
}
public SleepRequest(int sleepInMillis, String message) {
this.sleepInMillis = sleepInMillis;
this.message = message;
}
public int getSleepInMillis() {
return sleepInMillis;
}
public void setSleepInMillis(int sleepInMillis) {
this.sleepInMillis = sleepInMillis;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.the.basic.tech.info.m1.microservice.sleuth.rest;
import java.util.Date;
public class SleepResponse {
private String message;
private Date date;
public SleepResponse() {
}
public SleepResponse(String message, Date date) {
this.message = message;
this.date = date;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
}
In this class we are extending CommonsRequestLoggingFilter overriding beforeRequest, afterRequest and shouldLog methods of CommonsRequestLoggingFilter class.
package com.the.basic.tech.info.m1.microservice.sleuth.rest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.web.filter.CommonsRequestLoggingFilter;
import javax.servlet.http.HttpServletRequest;
public class SleuthCommonsRequestLoggingFilter extends CommonsRequestLoggingFilter {
@Autowired
private Tracer tracer;
@Override
protected void beforeRequest(HttpServletRequest request, String message) {
super.beforeRequest(request, message);
logger.info(message);
}
@Override
protected void afterRequest(HttpServletRequest request, String message) {
super.afterRequest(request, message);
tracer.getCurrentSpan().tag("request info", message);
logger.info(message);
}
@Override
protected boolean shouldLog(HttpServletRequest request) {
return true;
}
}
This microservice is just the copy of microservice m1-microservice-sleuth with different service name and port.
Maven file (pom.xml) would be looked like as below.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>m2-microservice-sleuth</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>m2-microservice-sleuth</name>
<description>Demo project for Spring Boot Sleuth M2</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.SR4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Application’s port needs to be configured in application.yml
server:
port: 8090
spring:
application:
name: m2-microservice-sleuth
sleuth:
sampler:
percentage: 1
zipkin:
baseUrl: http://localhost:9090
logging:
level:
org.springframework.web.servlet.DispatcherServlet: DEBUG
package com.the.basic.tech.info.m2.microservice.sleuth;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.sleuth.sampler.AlwaysSampler;
import org.springframework.context.annotation.Bean;
@SpringBootApplication
public class SleuthExampleServiceApplication {
@Bean
public AlwaysSampler defaultSampler() {
return new AlwaysSampler();
}
public static void main(String[] args) {
SpringApplication.run(SleuthExampleServiceApplication.class, args);
}
}
We need to apply logging filter as below.
package com.the.basic.tech.info.m2.microservice.sleuth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import com.the.basic.tech.info.m2.microservice.sleuth.rest.SleuthCommonsRequestLoggingFilter;
import javax.servlet.Filter;
@Configuration
public class Config {
@Bean
RestTemplate getRestTemplate() {
return new RestTemplate();
}
@Autowired
private Tracer tracer;
@Bean
public Filter logFilter() {
SleuthCommonsRequestLoggingFilter filter = new SleuthCommonsRequestLoggingFilter();
filter.setIncludeQueryString(true);
filter.setIncludePayload(true);
filter.setMaxPayloadLength(5120);
return filter;
}
}
package com.the.basic.tech.info.m2.microservice.sleuth.rest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
@RestController
public class HomeController {
@Autowired
private RestTemplate restTemplate;
@RequestMapping("/{sleepInMillis}")
public String callSleep(@RequestParam("port") int port, @PathVariable int sleepInMillis, @RequestParam(value = "message", defaultValue = "Good morning") String message) {
SleepRequest sleepRequest = new SleepRequest(sleepInMillis, message);
SleepResponse sleepResponse = restTemplate.postForObject("http://localhost:" + port + "/sleep", sleepRequest, SleepResponse.class);
return "Service at port " + port + " was sleeping for : " + sleepInMillis + " until " + sleepResponse.getDate();
}
}
package com.the.basic.tech.info.m2.microservice.sleuth.rest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
@RestController
public class SleepController {
private Logger logger = LoggerFactory.getLogger(SleepController.class);
@Autowired
private Tracer tracer;
@RequestMapping(value = "/sleep", method = RequestMethod.POST)
public SleepResponse sleep(@RequestBody SleepRequest sleepRequest) {
logger.info(sleepRequest.getMessage());
sleep(sleepRequest.getSleepInMillis() / 2);
sleep(sleepRequest.getSleepInMillis() / 2);
return new SleepResponse(sleepRequest.getMessage(), new Date());
}
private void sleep(int sleepInMillis) {
Span span = tracer.createSpan("This span was created programmatically, sleep " + sleepInMillis);
try {
span.tag("sleepInMillis", "" + sleepInMillis);
logger.info("sleepInMillis " + sleepInMillis);
try {
Thread.sleep(sleepInMillis);
} catch (InterruptedException e) {
e.printStackTrace();
}
} finally {
tracer.close(span);
}
}
}
package com.the.basic.tech.info.m2.microservice.sleuth.rest;
public class SleepRequest {
private int sleepInMillis;
private String message;
public SleepRequest() {
}
public SleepRequest(int sleepInMillis, String message) {
this.sleepInMillis = sleepInMillis;
this.message = message;
}
public int getSleepInMillis() {
return sleepInMillis;
}
public void setSleepInMillis(int sleepInMillis) {
this.sleepInMillis = sleepInMillis;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.the.basic.tech.info.m2.microservice.sleuth.rest;
import java.util.Date;
public class SleepResponse {
private String message;
private Date date;
public SleepResponse() {
}
public SleepResponse(String message, Date date) {
this.message = message;
this.date = date;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
}
In this class we are extending CommonsRequestLoggingFilter overriding beforeRequest, afterRequest and shouldLog methods of CommonsRequestLoggingFilter class.
package com.the.basic.tech.info.m2.microservice.sleuth.rest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.web.filter.CommonsRequestLoggingFilter;
import javax.servlet.http.HttpServletRequest;
public class SleuthCommonsRequestLoggingFilter extends CommonsRequestLoggingFilter {
@Autowired
private Tracer tracer;
@Override
protected void beforeRequest(HttpServletRequest request, String message) {
super.beforeRequest(request, message);
logger.info(message);
}
@Override
protected void afterRequest(HttpServletRequest request, String message) {
super.afterRequest(request, message);
tracer.getCurrentSpan().tag("request info", message);
logger.info(message);
}
@Override
protected boolean shouldLog(HttpServletRequest request) {
return true;
}
}
Execute below maven command: mvn spring-boot:run
D:\development\spring-cloud-sleuth-zipkin\microservice-server-zipkin>mvn spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building microservice-server-zipkin 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.4.0.RELEASE:run (default-cli) > test-compile @ microservice-server-zipkin >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ microservice-server-zipkin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ microservice-server-zipkin ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ microservice-server-zipkin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\development\spring-cloud-sleuth-zipkin\microservice-server-zipkin\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ microservice-server-zipkin ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.4.0.RELEASE:run (default-cli) < test-compile @ microservice-server-zipkin <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:1.4.0.RELEASE:run (default-cli) @ microservice-server-zipkin ---
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.0.RELEASE)
2021-07-10 22:16:54.779 INFO 26252 --- [ main] c.t.b.t.i.m.s.z.ZipkinServerApplication : Starting ZipkinServerApplication on LOCALHOST with PID 26252 (D:\development\spring-cloud-sleuth-zipkin\microservice-server-zipkin\target\classes started by 172025 in D:\development\spring-cloud-sleuth-zipkin\microservice-server-zipkin)
2021-07-10 22:16:54.788 INFO 26252 --- [ main] c.t.b.t.i.m.s.z.ZipkinServerApplication : No active profile set, falling back to default profiles: default
2021-07-10 22:16:54.919 INFO 26252 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1dee1218: startup date [Sat Jul 10 22:16:54 IST 2021]; root of context hierarchy
2021-07-10 22:16:56.373 INFO 26252 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'characterEncodingFilter' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration; factoryMethodName=characterEncodingFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/HttpEncodingAutoConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=zipkin.autoconfigure.ui.ZipkinUiAutoConfiguration; factoryMethodName=characterEncodingFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [zipkin/autoconfigure/ui/ZipkinUiAutoConfiguration.class]]
2021-07-10 22:16:58.645 INFO 26252 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 9090 (http)
2021-07-10 22:16:58.675 INFO 26252 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2021-07-10 22:16:58.680 INFO 26252 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.4
2021-07-10 22:16:58.852 INFO 26252 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-07-10 22:16:58.854 INFO 26252 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3945 ms
2021-07-10 22:16:59.354 INFO 26252 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2021-07-10 22:16:59.361 INFO 26252 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricFilter' to: [/*]
2021-07-10 22:16:59.363 INFO 26252 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2021-07-10 22:16:59.368 INFO 26252 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2021-07-10 22:16:59.371 INFO 26252 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2021-07-10 22:16:59.376 INFO 26252 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2021-07-10 22:16:59.382 INFO 26252 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationContextIdFilter' to: [/*]
2021-07-10 22:16:59.384 INFO 26252 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2021-07-10 22:16:59.961 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1dee1218: startup date [Sat Jul 10 22:16:54 IST 2021]; root of context hierarchy
2021-07-10 22:17:00.191 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/v1/dependencies],methods=[GET],produces=[application/json]}" onto public byte[] zipkin.server.ZipkinQueryApiV1.getDependencies(long,java.lang.Long)
2021-07-10 22:17:00.197 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/v1/trace/{traceId}],methods=[GET],produces=[application/json]}" onto public byte[] zipkin.server.ZipkinQueryApiV1.getTrace(java.lang.String,org.springframework.web.context.request.WebRequest)
2021-07-10 22:17:00.200 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/v1/services],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.List<java.lang.String>> zipkin.server.ZipkinQueryApiV1.getServiceNames()
2021-07-10 22:17:00.217 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/v1/traces],methods=[GET],produces=[application/json]}" onto public byte[] zipkin.server.ZipkinQueryApiV1.getTraces(java.lang.String,java.lang.String,java.lang.String,java.lang.Long,java.lang.Long,java.lang.Long,java.lang.Long,java.lang.Integer)
2021-07-10 22:17:00.232 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/v1/spans],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.List<java.lang.String>> zipkin.server.ZipkinQueryApiV1.getSpanNames(java.lang.String)
2021-07-10 22:17:00.237 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/v1/spans],methods=[POST],consumes=[application/x-thrift]}" onto public org.springframework.web.context.request.async.DeferredResult<org.springframework.http.ResponseEntity<?>> zipkin.server.ZipkinHttpCollector.uploadSpansThrift(java.lang.String,byte[])
2021-07-10 22:17:00.251 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/v1/spans],methods=[POST]}" onto public org.springframework.web.context.request.async.DeferredResult<org.springframework.http.ResponseEntity<?>> zipkin.server.ZipkinHttpCollector.uploadSpansJson(java.lang.String,byte[])
2021-07-10 22:17:00.262 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2021-07-10 22:17:00.265 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2021-07-10 22:17:00.294 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/ || /traces/{id} || /dependency],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView zipkin.autoconfigure.ui.ZipkinUiAutoConfiguration.forwardUiEndpoints(org.springframework.ui.ModelMap)
2021-07-10 22:17:00.299 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/index.html],methods=[GET]}" onto public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> zipkin.autoconfigure.ui.ZipkinUiAutoConfiguration.serveIndex()
2021-07-10 22:17:00.303 INFO 26252 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/config.json],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<zipkin.autoconfigure.ui.ZipkinUiProperties> zipkin.autoconfigure.ui.ZipkinUiAutoConfiguration.serveUiConfig()
2021-07-10 22:17:00.387 INFO 26252 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2021-07-10 22:17:00.395 INFO 26252 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2021-07-10 22:17:00.471 INFO 26252 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2021-07-10 22:17:00.987 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2021-07-10 22:17:00.996 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env || /env.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:17:01.008 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:17:01.028 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/configprops || /configprops.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:17:01.060 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/info || /info.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:17:01.087 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/trace || /trace.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:17:01.096 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/health || /health.json],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)
2021-07-10 22:17:01.104 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/heapdump || /heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
2021-07-10 22:17:01.129 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2021-07-10 22:17:01.132 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics || /metrics.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:17:01.151 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/mappings || /mappings.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:17:01.165 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/beans || /beans.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:17:01.173 INFO 26252 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/dump || /dump.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:17:01.358 INFO 26252 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2021-07-10 22:17:01.380 INFO 26252 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2021-07-10 22:17:01.754 INFO 26252 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 9090 (http)
2021-07-10 22:17:01.770 INFO 26252 --- [ main] c.t.b.t.i.m.s.z.ZipkinServerApplication : Started ZipkinServerApplication in 8.312 seconds (JVM running for 18.03)
2021-07-10 22:18:59.235 INFO 26252 --- [nio-9090-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet 'dispatcherServlet'
2021-07-10 22:18:59.239 INFO 26252 --- [nio-9090-exec-2] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2021-07-10 22:18:59.354 INFO 26252 --- [nio-9090-exec-2] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 110 ms
Execute below maven command: mvn spring-boot:run
D:\development\spring-cloud-sleuth-zipkin\m1-microservice-sleuth>mvn spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building m1-microservice-sleuth 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.4.0.RELEASE:run (default-cli) > test-compile @ m1-microservice-sleuth >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ m1-microservice-sleuth ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ m1-microservice-sleuth ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ m1-microservice-sleuth ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\development\spring-cloud-sleuth-zipkin\m1-microservice-sleuth\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ m1-microservice-sleuth ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.4.0.RELEASE:run (default-cli) < test-compile @ m1-microservice-sleuth <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:1.4.0.RELEASE:run (default-cli) @ m1-microservice-sleuth ---
2021-07-10 22:40:37.199 INFO [bootstrap,,,] 13220 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1eec5dfe: startup date [Sat Jul 10 22:40:37 IST 2021]; root of context hierarchy
2021-07-10 22:40:38.016 INFO [bootstrap,,,] 13220 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$20254c04] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.0.RELEASE)
2021-07-10 22:40:42.388 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] .i.m.m.s.SleuthExampleServiceApplication : No active profile set, falling back to default profiles: default
2021-07-10 22:40:42.423 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3c30f635: startup date [Sat Jul 10 22:40:42 IST 2021]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1eec5dfe
2021-07-10 22:40:44.679 WARN [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance @Configuration bean definition 'refreshScope' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.
2021-07-10 22:40:45.158 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=754990fa-415c-3d8d-8f71-d70c19550f9e
2021-07-10 22:40:45.305 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$DefaultAsyncConfigurerSupport' of type [class org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$DefaultAsyncConfigurerSupport$$EnhancerBySpringCGLIB$$414ce6ca] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-07-10 22:40:46.059 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$20254c04] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-07-10 22:40:49.425 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2021-07-10 22:40:49.450 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2021-07-10 22:40:49.454 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.4
2021-07-10 22:40:49.633 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-07-10 22:40:49.647 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 7224 ms
2021-07-10 22:40:52.489 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2021-07-10 22:40:52.506 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricFilter' to: [/*]
2021-07-10 22:40:52.514 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2021-07-10 22:40:52.515 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2021-07-10 22:40:52.523 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2021-07-10 22:40:52.532 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2021-07-10 22:40:52.533 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2021-07-10 22:40:52.534 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'traceFilter' to: [/*]
2021-07-10 22:40:52.535 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'logFilter' to: [/*]
2021-07-10 22:40:52.536 INFO [m1-microservice-sleuth,,,] 13220 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationContextIdFilter' to: [/*]
2021-07-10 22:40:56.986 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3c30f635: startup date [Sat Jul 10 22:40:42 IST 2021]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1eec5dfe
2021-07-10 22:40:57.342 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{sleepInMillis}]}" onto public java.lang.String com.the.basic.tech.info.m1.microservice.sleuth.rest.HomeController.callSleep(int,int,java.lang.String)
2021-07-10 22:40:57.349 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sleep],methods=[POST]}" onto public com.the.basic.tech.info.m1.microservice.sleuth.rest.SleepResponse com.the.basic.tech.info.m1.microservice.sleuth.rest.SleepController.sleep(com.the.basic.tech.info.m1.microservice.sleuth.rest.SleepRequest)
2021-07-10 22:40:57.357 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2021-07-10 22:40:57.363 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2021-07-10 22:40:57.676 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2021-07-10 22:40:57.772 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2021-07-10 22:40:57.942 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2021-07-10 22:40:59.934 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/configprops || /configprops.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:00.327 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/restart || /restart.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.context.restart.RestartMvcEndpoint.invoke()
2021-07-10 22:41:00.557 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/resume || /resume.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2021-07-10 22:41:00.690 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2021-07-10 22:41:00.808 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics || /metrics.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:00.867 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:00.948 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2021-07-10 22:41:00.988 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env || /env.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:01.000 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/heapdump || /heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
2021-07-10 22:41:01.030 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/health || /health.json],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)
2021-07-10 22:41:01.051 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/beans || /beans.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:01.064 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/dump || /dump.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:01.070 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/pause || /pause.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2021-07-10 22:41:01.083 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.value(java.util.Map<java.lang.String, java.lang.String>)
2021-07-10 22:41:01.087 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/reset],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.reset()
2021-07-10 22:41:01.101 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/trace || /trace.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:01.108 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/refresh || /refresh.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2021-07-10 22:41:01.119 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/mappings || /mappings.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:01.129 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/info || /info.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:01.577 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService
2021-07-10 22:41:02.251 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2021-07-10 22:41:02.365 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2021-07-10 22:41:02.436 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshEndpoint' has been autodetected for JMX exposure
2021-07-10 22:41:02.524 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'restartEndpoint' has been autodetected for JMX exposure
2021-07-10 22:41:02.707 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshScope' has been autodetected for JMX exposure
2021-07-10 22:41:02.771 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'environmentManager' has been autodetected for JMX exposure
2021-07-10 22:41:02.881 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2021-07-10 22:41:03.212 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'restartEndpoint': registering with JMX server as MBean [org.springframework.cloud.context.restart:name=restartEndpoint,type=RestartEndpoint]
2021-07-10 22:41:03.519 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2021-07-10 22:41:04.382 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=3c30f635,type=ConfigurationPropertiesRebinder]
2021-07-10 22:41:04.500 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshEndpoint': registering with JMX server as MBean [org.springframework.cloud.endpoint:name=refreshEndpoint,type=RefreshEndpoint]
2021-07-10 22:41:05.205 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2021-07-10 22:41:06.417 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2021-07-10 22:41:06.610 INFO [m1-microservice-sleuth,,,] 13220 --- [ main] .i.m.m.s.SleuthExampleServiceApplication : Started SleuthExampleServiceApplication in 33.372 seconds (JVM running for 44.531)
Execute below maven command: mvn spring-boot:run
D:\development\spring-cloud-sleuth-zipkin\m2-microservice-sleuth>mvn spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building m2-microservice-sleuth 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.4.0.RELEASE:run (default-cli) > test-compile @ m2-microservice-sleuth >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ m2-microservice-sleuth ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ m2-microservice-sleuth ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ m2-microservice-sleuth ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\development\spring-cloud-sleuth-zipkin\m2-microservice-sleuth\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ m2-microservice-sleuth ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.4.0.RELEASE:run (default-cli) < test-compile @ m2-microservice-sleuth <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:1.4.0.RELEASE:run (default-cli) @ m2-microservice-sleuth ---
2021-07-10 22:40:53.820 INFO [bootstrap,,,] 8528 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@6f580081: startup date [Sat Jul 10 22:40:53 IST 2021]; root of context hierarchy
2021-07-10 22:40:55.296 INFO [bootstrap,,,] 8528 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$863154f6] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.0.RELEASE)
2021-07-10 22:41:02.537 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] .i.m.m.s.SleuthExampleServiceApplication : No active profile set, falling back to default profiles: default
2021-07-10 22:41:02.575 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7b2d943a: startup date [Sat Jul 10 22:41:02 IST 2021]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@6f580081
2021-07-10 22:41:06.795 WARN [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance @Configuration bean definition 'refreshScope' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.
2021-07-10 22:41:07.550 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=754990fa-415c-3d8d-8f71-d70c19550f9e
2021-07-10 22:41:07.856 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$DefaultAsyncConfigurerSupport' of type [class org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$DefaultAsyncConfigurerSupport$$EnhancerBySpringCGLIB$$a758efbc] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-07-10 22:41:08.632 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$863154f6] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-07-10 22:41:11.041 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8090 (http)
2021-07-10 22:41:11.063 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2021-07-10 22:41:11.066 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.4
2021-07-10 22:41:11.221 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-07-10 22:41:11.225 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 8649 ms
2021-07-10 22:41:13.489 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2021-07-10 22:41:13.500 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricFilter' to: [/*]
2021-07-10 22:41:13.508 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2021-07-10 22:41:13.510 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2021-07-10 22:41:13.513 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2021-07-10 22:41:13.536 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2021-07-10 22:41:13.539 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2021-07-10 22:41:13.550 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'traceFilter' to: [/*]
2021-07-10 22:41:13.555 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'logFilter' to: [/*]
2021-07-10 22:41:13.563 INFO [m2-microservice-sleuth,,,] 8528 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationContextIdFilter' to: [/*]
2021-07-10 22:41:16.197 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7b2d943a: startup date [Sat Jul 10 22:41:02 IST 2021]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@6f580081
2021-07-10 22:41:16.625 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/{sleepInMillis}]}" onto public java.lang.String com.the.basic.tech.info.m2.microservice.sleuth.rest.HomeController.callSleep(int,int,java.lang.String)
2021-07-10 22:41:16.672 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sleep],methods=[POST]}" onto public com.the.basic.tech.info.m2.microservice.sleuth.rest.SleepResponse com.the.basic.tech.info.m2.microservice.sleuth.rest.SleepController.sleep(com.the.basic.tech.info.m2.microservice.sleuth.rest.SleepRequest)
2021-07-10 22:41:16.712 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2021-07-10 22:41:16.727 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2021-07-10 22:41:17.011 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2021-07-10 22:41:17.018 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2021-07-10 22:41:17.271 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2021-07-10 22:41:18.970 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/refresh || /refresh.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2021-07-10 22:41:19.014 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.value(java.util.Map<java.lang.String, java.lang.String>)
2021-07-10 22:41:19.044 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/reset],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.reset()
2021-07-10 22:41:19.111 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:19.120 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/restart || /restart.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.context.restart.RestartMvcEndpoint.invoke()
2021-07-10 22:41:19.156 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/configprops || /configprops.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:19.164 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/health || /health.json],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)
2021-07-10 22:41:19.194 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/mappings || /mappings.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:19.264 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/info || /info.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:19.291 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2021-07-10 22:41:19.295 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics || /metrics.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:19.312 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/heapdump || /heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
2021-07-10 22:41:19.329 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/dump || /dump.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:19.346 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/pause || /pause.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2021-07-10 22:41:19.360 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/trace || /trace.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:19.371 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/beans || /beans.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:19.402 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2021-07-10 22:41:19.413 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env || /env.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2021-07-10 22:41:19.426 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/resume || /resume.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2021-07-10 22:41:19.884 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService
2021-07-10 22:41:20.135 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2021-07-10 22:41:20.178 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2021-07-10 22:41:20.195 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshEndpoint' has been autodetected for JMX exposure
2021-07-10 22:41:20.215 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'restartEndpoint' has been autodetected for JMX exposure
2021-07-10 22:41:20.219 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshScope' has been autodetected for JMX exposure
2021-07-10 22:41:20.231 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'environmentManager' has been autodetected for JMX exposure
2021-07-10 22:41:20.257 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2021-07-10 22:41:20.304 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'restartEndpoint': registering with JMX server as MBean [org.springframework.cloud.context.restart:name=restartEndpoint,type=RestartEndpoint]
2021-07-10 22:41:20.348 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2021-07-10 22:41:20.386 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=7b2d943a,type=ConfigurationPropertiesRebinder]
2021-07-10 22:41:20.410 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshEndpoint': registering with JMX server as MBean [org.springframework.cloud.endpoint:name=refreshEndpoint,type=RefreshEndpoint]
2021-07-10 22:41:20.797 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2021-07-10 22:41:21.268 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8090 (http)
2021-07-10 22:41:21.290 INFO [m2-microservice-sleuth,,,] 8528 --- [ main] .i.m.m.s.SleuthExampleServiceApplication : Started SleuthExampleServiceApplication in 33.087 seconds (JVM running for 49.579)
Once this url will be hit on the browser, you will see below logging statements appear in the console that look like.
2021-07-11 01:58:30.601 DEBUG [m1-microservice-sleuth,7da0cc6c45287747,dbfcbed5c72d1ce8,true] 13220 --- [nio-8080-exec-9] o.s.web.servlet.DispatcherServlet : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2021-07-11 01:58:30.638 DEBUG [m1-microservice-sleuth,7da0cc6c45287747,7da0cc6c45287747,true] 13220 --- [nio-8080-exec-9] o.s.web.servlet.DispatcherServlet : Successfully completed request
2021-07-11 01:58:30.640 INFO [m1-microservice-sleuth,7da0cc6c45287747,7da0cc6c45287747,true] 13220 --- [nio-8080-exec-9] .m.s.r.SleuthCommonsRequestLoggingFilter : After request [uri=/1007?port=8090]
2021-07-11 01:58:30.742 INFO [m1-microservice-sleuth,e06cdcc098272a9d,e06cdcc098272a9d,false] 13220 --- [io-8080-exec-10] .m.s.r.SleuthCommonsRequestLoggingFilter : Before request [uri=/favicon.ico]
2021-07-11 01:58:30.743 DEBUG [m1-microservice-sleuth,e06cdcc098272a9d,e06cdcc098272a9d,false] 13220 --- [io-8080-exec-10] o.s.web.servlet.DispatcherServlet : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/favicon.ico]
2021-07-11 01:58:30.744 DEBUG [m1-microservice-sleuth,e06cdcc098272a9d,e06cdcc098272a9d,false] 13220 --- [io-8080-exec-10] o.s.web.servlet.DispatcherServlet : Last-Modified value for [/favicon.ico] is: -1
2021-07-11 01:58:30.768 DEBUG [m1-microservice-sleuth,e06cdcc098272a9d,e06cdcc098272a9d,false] 13220 --- [io-8080-exec-10] o.s.web.servlet.DispatcherServlet : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2021-07-11 01:58:30.771 DEBUG [m1-microservice-sleuth,e06cdcc098272a9d,e06cdcc098272a9d,false] 13220 --- [io-8080-exec-10] o.s.web.servlet.DispatcherServlet : Successfully completed request
2021-07-11 01:58:30.772 INFO [m1-microservice-sleuth,e06cdcc098272a9d,e06cdcc098272a9d,false] 13220 --- [io-8080-exec-10] .m.s.r.SleuthCommonsRequestLoggingFilter : After request [uri=/favicon.ico]
Look for the trace of the call, we need to access the Zipkin GUI: http://localhost:9090/
Make sure you set the date range correctly and click Find Taces. You should see tracing information for the endpoint (http://localhost:8080/1007?port=8090) returned. Clicking on it will show you all the details collected from the Sleuth logs including timing information for the request.
Happy Learning :). Drop a question in comment section in case you have any.