How To Do Distributed Tracing With Opentelemetry in Spring Boot

Sdílet
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

Komentáře • 21

  • @victorwanderley52
    @victorwanderley52 Před 29 dny +1

    Great video. Thank you so much!

  • @himanshubhusanrath4529
    @himanshubhusanrath4529 Před 9 měsíci +1

    Very nice and helpful explanation. Thank you so much for this content !

  • @tomjosi742
    @tomjosi742 Před 5 měsíci

    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 .

  • @girishanker3796
    @girishanker3796 Před 6 měsíci

    Great video

  • @yevgeny3985
    @yevgeny3985 Před 8 měsíci +1

    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?

  • @hamedhatami4831
    @hamedhatami4831 Před 6 dny

    How inconvenient is on Spring as compared to Quarkus OpenTelemtry enablement!

  • @MutantBikers
    @MutantBikers Před rokem +1

    Cool

  • @JohnWindberg
    @JohnWindberg Před 6 měsíci

    How about configuring log exporting to the otel-collector? I'm not having any luck getting that working.

  • @PrajwalM-ex8uc
    @PrajwalM-ex8uc Před 3 měsíci

    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?

  • @ashoks609
    @ashoks609 Před měsícem

    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

  • @suryajit7
    @suryajit7 Před 11 měsíci +1

    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?

    • @RefactorFirst
      @RefactorFirst  Před 11 měsíci

      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.

    • @kasun7367
      @kasun7367 Před 9 měsíci

      @@RefactorFirst you mean we need to config Opentelemetry for each microservice ?

    • @sukeerthibotu9029
      @sukeerthibotu9029 Před 4 měsíci

      Two services I tried with same config, generated different traceid

  • @vkpant
    @vkpant Před rokem

    will it work for event driven applications e.g. service 1 and 2 are kafka prod/consumers?

    • @RefactorFirst
      @RefactorFirst  Před rokem

      I haven't tried it with aysnc communication. So I can't say anything about it..

  • @joaopaulodasilvajpaulosi1304

    I keep getting the following error
    Failed to publish metrics. Server responded with HTTP status code 404 and body 404 page not found

  • @sumansaurabh6501
    @sumansaurabh6501 Před 5 měsíci

    Getting different traceId in both my application.

  • @adryanga2874
    @adryanga2874 Před rokem +1

    Pues no valio 🥲

  • @user-yf8jf3fo2x
    @user-yf8jf3fo2x Před měsícem

    i am loosing traceId between 2 services with this way, context not propоgated ( i use feign)