How To Do Distributed Tracing With Opentelemetry in Spring Boot
Vložit
- čas přidán 28. 07. 2024
- In this video we will look into how we can capture distributed traces that are generated as part of communication between service.
We will use Opentelemetry standards to export the traces from a Spring boot Application and the visualize the traces on a Jaeger dashboard.
We will start the Jaeger dashboard using the docker image using docker compose.
You can also read about this along with the GitHub link to the code: refactorfirst.com/distributed...
You can support me by buying me a coffee : www.buymeacoffee.com/amrutprabhu
-----------------
Gear I use :
-----------------
Sony Alpha a6000 : Amazon India : amzn.to/3RM7QMJ
Germany : amzn.to/3G1Iw24
US : amzn.to/3cpKZ9E
UK : amzn.to/3J0g5Ry
Razer Microphone : Amazon India : amzn.to/3aQxI9C
Germany : amzn.to/3DRRrAh
US : amzn.to/3ITKu3Q
UK : amzn.to/3v3RHbU
------ Chapters --------
00:00 - Introduction
01:32 - Creating Spring Boot 3 Application
02:02 - Code Walkthrough
03:20 - Jaeger Docker Compose with Opentelemetry
03:55 - Code Walkthrough
05:17 - Opentelemetry Configuration
05:48 - Opentelemetry Url and Tracing Configurations
06:41 - Starting Jaeger Docker image
07:14 - Starting Two Services
08:05 - Generating Distributed Traces
08:45 - Distributed Traces in the Logs
09:16 - Visualizing Distributed Traces in Jaeger
10:21 - Article link and Code repo
10:29 - Conclusion
Music Credits:-
Sappheiros - promise
----------------------------
Social Media
CZcams / sappheiros
Spotify goo.gl/hE9MDJ
Twitter SappheirosMusic
Instagram sappheirosmusic
Facebook SappheirosMusic
Discord discord.gg/Pk87yN9
/ promise
-------------------------------------------------- - Věda a technologie
Great video. Thank you so much!
Very nice and helpful explanation. Thank you so much for this content !
took me a while to figure about the docker thing. after doing little research though i was able to figure it out. great video keep it up .
Great video
very nice article, 2 questions:
1.many other tutorials use java agent to Opentelemetry, why is it needed and why you are not using it?
2.What if I want to send custom metric, for example count of Login Users in my app? Can I do this with micrometer counter?
How inconvenient is on Spring as compared to Quarkus OpenTelemtry enablement!
Cool
How about configuring log exporting to the otel-collector? I'm not having any luck getting that working.
Very Nice video, I have a question, is it possible to display the spring boot application's logs as well in the jaeger UI? How can we achieve it?
Hi I have question
B3 header with custom traceid-spanid generated and sent from UI is not overriding auto generated one. Is there way to do that ?
Thanks
hey hi, nice video, I was able to do this for a single project. But how can I implement this in multiple microservices which are calling each other? Could you kindly make a video on this?
The code would be the same for multiple services.. In the video I am using the same project but using two different instances. It would be the same for multiple services also.
@@RefactorFirst you mean we need to config Opentelemetry for each microservice ?
Two services I tried with same config, generated different traceid
will it work for event driven applications e.g. service 1 and 2 are kafka prod/consumers?
I haven't tried it with aysnc communication. So I can't say anything about it..
I keep getting the following error
Failed to publish metrics. Server responded with HTTP status code 404 and body 404 page not found
Getting different traceId in both my application.
Did you find solution?
Pues no valio 🥲
i am loosing traceId between 2 services with this way, context not propоgated ( i use feign)