In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to build a link call monitoring system based on springboot". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The development of spring cloud is based on the micro-service architecture, so when the whole business system is developed to a certain stage, we may have dozens of micro-services, then the whole network is like cobwebs, and many cobwebs may be completely unknown to programmers as architects at the time of writing. So this may lead to serious call chain problems when a version is released, so we need to build a project to monitor our call link. make sure that when our program is online, the programmer is developed according to the architect's design and not random.
Then create our link call monitoring system directly on our spring-cloud-rbac project, as follows:
Add the following configuration to the pom.xml file in our zinpkin project:
4.0.0 com.zinpkin zinpkin 0.0.1-SNAPSHOT jar zinpkin Link call Monitoring system org.springframework.boot spring-boot-starter-parent 1.5.9.RELEASE UTF-8 UTF-8 1.8 org.springframework.cloud spring-cloud-starter-eureka io.zipkin.java zipkin- Server io.zipkin.java zipkin-autoconfigure-ui org.springframework.boot spring-boot-starter-web Org.springframework.boot spring-boot-starter-test test org.springframework.cloud Spring-cloud-dependencies Edgware.RELEASE pom import org. Springframework.boot spring-boot-maven-plugin
Then turn on our zinpkin annotation support on our main class as follows:
Package com.zinpkin;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.cloud.netflix.eureka.EnableEurekaClient;import zipkin.server.EnableZipkinServer;@SpringBootApplication@EnableEurekaClient@EnableZipkinServerpublic class ZinpkinApplication {public static void main (String [] args) {SpringApplication.run (ZinpkinApplication.class, args);}}
Then we create a new application-prod.properties configuration file in resource as shown below. At the same time, remember to add a configuration item with spring.profiles.active equal to prod in our startup environment configuration as in the previous chapter, otherwise the launched zinpkin will not access our configuration file:
Spring.application.name=zipkin-serverserver.port=9100# registry address eureka.client.serviceUrl.defaultZone= http://fjhyll:hyll-2.0@127.0.0.1:2100/eureka/
Visit the following address: http://127.0.0.1:9100/zipkin/, you can see the effect shown below:
This is the end of the content of "how to build a link call monitoring system based on springboot". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.