Microservices Tracing with Spring Cloud Sleuth & Zipkin | Microservices #8
Ғылым және технология
In this video I will show how to trace requests between microservices using Spring Cloud Sleuth and Zipkin. Spring Cloud Sleuth will help me identify the logs from a single request between all the microservices. And Zipkin will show me the elapsed times at the microservices.
This is the eighth video of the playlist where I will build a microservices architecture for a webpage, how to create microservices with Spring Boot and Spring Cloud, and how to handle the microservices with Docker and Kubernetes: • Microservices
Content:
* Add and configure Spring Cloud Sleuth and Zipkin to a project;
* How Spring Cloud Sleuth adds the trace id and span id to the log lines;
* What is the difference between the trace id and the span id;
* How to create custom span id;
* How to trace a latency with Zipkin.
Repository: github.com/serlesen/microserv...
My NEW eBook: sergiolema.dev/git-book/
Blog: bit.ly/47ornJL
LinkedIn: bit.ly/41Nn61q
Facebook: bit.ly/47rc9nh
My Desktop:
• Laptop: Macbook Pro 16' 2019
• Gaming Chair: amzn.to/47Vu6ed
• Mouse: amzn.to/3HoBwM1
• Desk: amzn.to/48Tc5Oi
• Screen: amzn.to/48VZkCL
Icons:
* Server by ifan kurniawan from NounProject.com
Пікірлер: 53
I like your approach to make videos. They are substantive and concise.
@TheDevWorldbySergioLema
Жыл бұрын
Thank you! I will keep this format so 😉
Dude! This is such a simple yet amazing explanation. Very brief but practical and easy to understand compared to those complex tutorials. Thanks for this!
@TheDevWorldbySergioLema
10 ай бұрын
I try my best to best easily understood. Thanks Chandra for the comment!
За 7 минут я понял всю базу и даже не представляю, как я мог жить без этих инструментов раньше
@TheDevWorldbySergioLema
7 ай бұрын
Thank you!
short n clear to the point tutorial,subscribed!
@TheDevWorldbySergioLema
Жыл бұрын
Thank you for following me!
Thanks for your video. It was really helpful.
@TheDevWorldbySergioLema
5 ай бұрын
Thank you Dan!
clear presentation, very good, thank you
@TheDevWorldbySergioLema
Жыл бұрын
Thanks for watching. Share it on your network, i'm sure somebody else will find it useful 👍
good video, explained well.👍
@TheDevWorldbySergioLema
Жыл бұрын
Thank you!
great work bro! subscribed
@TheDevWorldbySergioLema
Ай бұрын
Thank you Alex!
we need more videos !!!!
@TheDevWorldbySergioLema
4 ай бұрын
I'm working I'm working... I need more time 😅
Good job 🎉
@TheDevWorldbySergioLema
Жыл бұрын
Thank you 😁
i love so much !
@TheDevWorldbySergioLema
6 ай бұрын
Thank you Tran!
Hello, Could you explain how you setup your zipkin server, the one that run on 9411 ? I'm trying to setup a zipkin with java 19 and spring boot 3 but i found nothing on internet. Thank you !
@TheDevWorldbySergioLema
Жыл бұрын
You can follow the quickstart in the main website of Zipkin, zipkin.io/pages/quickstart.html
Hello ! Great video. Can you have a video about CI/CD for Microservices with spring boot & spring cloud ? Because I saw a little documentation about it. Thanks a lot.
@TheDevWorldbySergioLema
Жыл бұрын
Why not. I'm starting to have some requests about that. On which CI/CD? Jenkins, GitlabCI, Github?
@thanhlocnguyen4910
Жыл бұрын
@@TheDevWorldbySergioLema Github action for deploy to kubernetes, please !
@TheDevWorldbySergioLema
Жыл бұрын
It's easy for me. I don't want to setup a Jenkins or Gitlab server to just use the CI 😅
@thanhlocnguyen4910
Жыл бұрын
@@TheDevWorldbySergioLema Cool. Thanks a lot
Hello sir you have the way to run query button that in zipkin ui without run manaully and repeat run query every ms?
@TheDevWorldbySergioLema
Жыл бұрын
Sorry, but I'm not sure to understand your question.
Bro could you please do one video how we manage logs in micro service? As of now elk is paid right? So is any other alternatives
@TheDevWorldbySergioLema
2 жыл бұрын
That's a good topic, yes I will. Thank you for the suggestion
Sleuth is removed from spring cloud 2022 (spring boot 3), could you do a vid on their new recommendation. micrometer.
@TheDevWorldbySergioLema
Жыл бұрын
Yes, i must update some of my videos with Spring Boot 3
is it possible to display the logs with JSON format using Log4j2 and Spring Sleuth ?
@TheDevWorldbySergioLema
Жыл бұрын
You mean the traçability logs or the application logs? For the application logs, you can configure different handlers (check this video, kzread.info/dash/bejne/lHictM19qpnHZ7Q.html). I use to produce logs to be consumed by CloudWatch (Text logs) and by ElasticSearch (JSON logs with more fields/details). About the traçability logs of Sleuth, I'm not sure.
Is it possible to log traces to the authorization server? I couldn't do it out of the box
@TheDevWorldbySergioLema
5 ай бұрын
What do you mean TO the authorization server? The authorization server has a purpose, which is validating the user's credentials. Sending the logs to the authorization server would not be a good practice. The logs should be sent to a monitoring system (like Zipkin or Kibana or Prometheus)
@OfDreamAndDrama
5 ай бұрын
Sorry, wonky English. I meant tracing the security calls, and send them to the monitoring platform.
@TheDevWorldbySergioLema
5 ай бұрын
Yes, of course you can. But this will depend on your authorization server, not on the tracing system. Just increasing the log level of your authorization server should already give you the logs.
I tried to use it with spring 3.1.1 but its not working. Can you teach how to do it on the new version of Spring??
@TheDevWorldbySergioLema
11 ай бұрын
With the new version of Spring Boot, you have to use Micrometer. I didn't test it yet
@ANDREZENPS
11 ай бұрын
@@TheDevWorldbySergioLema yes, i tried to use that, but the traceId Micrometer gives me, Zipkin doesn't recognize it...
@TheDevWorldbySergioLema
11 ай бұрын
I share you this guide to setup Zipkin and Micrometer, but I didn't try it, www.appsdeveloperblog.com/micrometer-and-zipkin-in-spring-boot/
Sleuth tracer id does not propagate on another thread.
@TheDevWorldbySergioLema
Жыл бұрын
If you want to propagate some trace ID to new threads, you should use the spans and create your own IDs. Parallel threads are not natively handled by Sleuth.
@kalahastikathalu1635
Жыл бұрын
Can you please more elaborate on this how we can propagate and what are the different types we have to propagate same traceId? I tried many ways nothing worked for me. In my service flow we are calling multiple MicroServices internally and we have Kafka publisher in one micro service and listener is there in another service so till publisher level I was seeing same traceId when msg reaches to listener I was seeing new traceId and spanId but I want to have same traceId at consumer level also for each Kafka published msg
@TheDevWorldbySergioLema
Жыл бұрын
I've never use it, but there are some libraries already for Kafka. Did you check them? cloud.spring.io/spring-cloud-static/spring-cloud-sleuth/2.2.0.M2/reference/html/#_sleuth_with_zipkin_over_rabbitmq_or_kafka
sir could u make video video with micrometer coz slueth is deprecated in 2022
@TheDevWorldbySergioLema
7 ай бұрын
It's in my TODO list Sajjad I hope to find the time to do it 😅
@SajjadAhmed-lc2dr
7 ай бұрын
@@TheDevWorldbySergioLema best of luck😁
@TheDevWorldbySergioLema
7 ай бұрын
Thank you