Distributed Tracing in Microservice with Spring Cloud Sleuth & Zipkin | Java Techie

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 มิ.ย. 2018
  • This tutorial explain you how to use Sleuth to add tracing information in logs. In addition to that, we can also export this information to Zipkin so that we can visualize this through UI
    GitHub:
    github.com/Java-Techie-jt/spr...
    Blogs:
    javagyanmantra.wixsite.com/we...
    Facebook Group :
    / 919464521471923
    Like & Subscribe
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 71

  • @sanjaydhikodi9758
    @sanjaydhikodi9758 4 ปีที่แล้ว +2

    Beautiful explaination sir....keep going....I love the way you implement the technical things.....Keep it up sir

  • @palashkhatri7820
    @palashkhatri7820 4 ปีที่แล้ว +1

    Beautiful practical explanation . Thanks @Java Techie

  • @neha6000
    @neha6000 6 ปีที่แล้ว +2

    thank you basant best teacher ever

  • @g.raghavendramurty7713
    @g.raghavendramurty7713 11 หลายเดือนก่อน +1

    great work sir, thanks for this informative video

  • @manojmehta3226
    @manojmehta3226 3 ปีที่แล้ว +1

    Nicely explained thanks

  • @souravsantra4731
    @souravsantra4731 3 ปีที่แล้ว +1

    Thanks for explanation.

  • @gopald7263
    @gopald7263 6 ปีที่แล้ว +1

    Awesome..

  • @i_am_kshitij1118
    @i_am_kshitij1118 9 หลายเดือนก่อน

    When I changed the port number of zipkin server, traces were not getting added. No configuration was mentioned anywhere regarding port number . Could u plz tell is it mandatory to run on same default port of Zipkin server

  • @manish.adhikari
    @manish.adhikari 4 ปีที่แล้ว +2

    Hey Basant,
    It is really a helpful tutorial. You are doing a great job! Thanks!
    However I've one question:
    How does our client application know where is Zipkin server hosted to push the microservice trace details? Where exactly we do this configuration?
    For example: we have a GUI (html) from where our execution reaches to controller method. From inside this method we are calling a microservice which internally calls another microservice and the aggregated data is pushed back to frontend. We added logs everywhere but where exactly we let our application know about the zipkin server to push the trace details.

    • @codefarm0
      @codefarm0 4 ปีที่แล้ว +2

      I think I know the answer to this. Basically, Zipkin is taking input details from microservices which have a library for instrumenting the code and allowed to do so in this case, spring cloud sleuth is doing the job. When you have added the Zipkin library it has default configuration where URL of Zipkin server localhost:9411 is mentioned in the microservices.
      @Basant Correct me If I am wrong.
      @Manish let me know if u need more details.

    • @girishanker3796
      @girishanker3796 7 หลายเดือนก่อน

      I think since we are adding a sleuth-zipkin dependency in the client application, it will automatically trigger a post request to the default port in which we are configuring the zipkin server which is 9411.

  • @jaffarali2873
    @jaffarali2873 2 หลายเดือนก่อน

    I have followed your video but I have not receved any traceId and spanId these are null after and before hit to the service

  • @sarojsahoo8763
    @sarojsahoo8763 4 ปีที่แล้ว +1

    Does only Edgware.SR3 has DefaultSampler class . I dont find any other version has this class.

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Am not sure will check and update you

  • @vijayvantipalli3486
    @vijayvantipalli3486 3 ปีที่แล้ว

    How does payment service recognise the zipping server without mentioning zipkin configuration anywhere in the service?

  • @mohammadreza.beygifard
    @mohammadreza.beygifard 3 ปีที่แล้ว +1

    Thanks for the video your videos helped me so much, but for this particular video, if you had created a parent mvn proj with two children both of them with only one end point you could show us in a more clear way what is traceId, spanId and parentId. Anyway thank you for your time!

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      Yeah I got your approach . That way it's easy to differentiate

  • @i_am_kshitij1118
    @i_am_kshitij1118 9 หลายเดือนก่อน

    And do you know how can we add span Id and trace Id to kafka consumer application which doesn't have any controller?

  • @rakeshmalhotra9088
    @rakeshmalhotra9088 4 ปีที่แล้ว

    Can you please explain, if the Zipkin server application is mandatory to have? Can't we install Zipkin server separately on port 9411 as a Docker container and configure our Payment service application to post traces to that server?

    • @rakeshmalhotra9088
      @rakeshmalhotra9088 4 ปีที่แล้ว +1

      Tested the integration with running Zipkin locally on 9411 and the Application was pushing traces to Zipkin. Thank you!

  • @saurabhkailashchandrapuran8609
    @saurabhkailashchandrapuran8609 3 ปีที่แล้ว +2

    When and where you define payment service register or link with zipkin server/tool. So how zipkin knows there is service payment ...can you please explain sir ?

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว +1

      We no need to define anywhere this job will take care by sleuth dependency .

  • @sarojsahoo8763
    @sarojsahoo8763 4 ปีที่แล้ว +1

    So Both TraceId and Span ID are going to get matched against microservices (ex-If I have 2 microservices)

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      No trace id will be same across all microservice but not span id

  • @shilpasingla1739
    @shilpasingla1739 ปีที่แล้ว +1

    Sir ...we will have trace I'd and span I'd different in case we are hitting same service again and again. Please correct me if any gap

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Yes spam id will be vary

  • @noumaanmohammad1274
    @noumaanmohammad1274 3 ปีที่แล้ว +1

    If we call external microservices ... Do we need to have a bean of alwayssampler in every external service we call or only in the parent service will be enough ?

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว +1

      Eventhough we will not add this Always sampler spring boot will add default one .
      So adding in parent is enough

    • @noumaanmohammad1274
      @noumaanmohammad1274 3 ปีที่แล้ว +1

      Thank you..

  • @NewFactsFictions-
    @NewFactsFictions- 5 ปีที่แล้ว

    HI I tried with spring boot 2.1.0 -RELEASE and not able to see the service in zipking and thre is no samplar in this version can you please help me for spring boot 2.1.0 release with zipkin and rabitMQ with spring cloud stream

    • @codefarm0
      @codefarm0 4 ปีที่แล้ว

      probably Zipkin as a server is discontinued from spring boot, now it's available as Zipkin client only for Zipkin server you have to go to zipkin.io and use the executable directly from there

  • @manishpeke3204
    @manishpeke3204 3 ปีที่แล้ว

    Sir could you please do video on distributed tracing for kafka based consumer and producer application

  • @gollayellaiah2038
    @gollayellaiah2038 4 ปีที่แล้ว

    Hi,
    When i run zipkin server i am getting below issue and not able to lunch application.
    An attempt was made to call a method that does not exist. The attempt was made from the following location:
    zipkin2.server.internal.ZipkinHealthIndicator.(ZipkinHealthIndicator.java:26)
    The following method did not exist:
    org.springframework.boot.actuate.health.CompositeHealthIndicator.(Lorg/springframework/boot/actuate/health/HealthAggregator;)V
    The method's class, org.springframework.boot.actuate.health.CompositeHealthIndicator, is available from the following locations:
    ....
    Correct the classpath of your application so that it contains a single, compatible version of org.springframework.boot.actuate.health.CompositeHealthIndicator
    Note: I am using spring boot version 2.2.6
    In main class it is showing The type EnableZipkinServer is deprecated.
    Could you please suggest me how can i resolve these issues.
    Thank you !!

  • @rajeshch1267
    @rajeshch1267 5 ปีที่แล้ว +2

    Hi sir ,
    where it is log files in zipkin Ui,suppose in production any exception occure how to see that Exception log files.

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว +2

      Hey Rajesh , log file won't be visible there , hope you know what is the use of log file .
      It will be available in your environment like QA or Prod , if you are doing cloud deployment then you can check in cloud itself

    • @rajeshch1267
      @rajeshch1267 5 ปีที่แล้ว +2

      Thank you. But if any issues come in production environment how to see that log files any tool available or not

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว +1

      Yes man we need to go to putty tool then check the box there you can find log folder .

    • @sarojsahoo8763
      @sarojsahoo8763 4 ปีที่แล้ว

      @@rajeshch1267 Generally Production log we see through Splunk tool . I have used that in my project.

    • @rajeshreddychalla671
      @rajeshreddychalla671 4 ปีที่แล้ว

      @@sarojsahoo8763 thank you and elk also shall we log files ?

  • @user-le6ts6ci7h
    @user-le6ts6ci7h 2 ปีที่แล้ว

    At 23:25 why is the trace id and span id are different even though we call the same micro service

  • @hackstreet781
    @hackstreet781 6 หลายเดือนก่อน

    how application knows where zipkin is running ?

  • @nmlocalhost9780
    @nmlocalhost9780 5 ปีที่แล้ว +1

    Hi All,
    I want to do Zipkin setup on Spring MVC(Not SpringBoot) using Gradle.
    Anyone please share me the proper example.

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      Yes we can do let me check it .

    • @nmlocalhost9780
      @nmlocalhost9780 5 ปีที่แล้ว

      @@Javatechie Thanks for your reply, Its very helpful, If I get it EOD. Thanks In Advance

    • @nmlocalhost9780
      @nmlocalhost9780 4 ปีที่แล้ว

      @@Javatechie Any update pls

  • @i_am_kshitij1118
    @i_am_kshitij1118 9 หลายเดือนก่อน +1

    Are we using java 8 here??

    • @Javatechie
      @Javatechie  9 หลายเดือนก่อน

      No not here

  • @mysongs199
    @mysongs199 3 ปีที่แล้ว

    Sorry my bad, in this vedio zipkin server started. But where we configure payment application details in zipkin server..

  • @funvideos6569
    @funvideos6569 4 ปีที่แล้ว +1

    Hi, Are you from Odisha

  • @raghuvardhansaripalli9636
    @raghuvardhansaripalli9636 3 ปีที่แล้ว +1

    Cant we see the log information in the zipkin dashboard ?

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      Yes we can see, I shown it in video for better understanding you can check my microservice playlist

    • @raghuvardhansaripalli9636
      @raghuvardhansaripalli9636 3 ปีที่แล้ว +1

      @@Javatechie Thanks for your response so quickly. Sorry to bother you again.
      I have seen your two videos separately which you have done one for Distributed Log tracing by using Sleuth + Zipkin (TO get Trace Id and SpanID) and another video for Centralized logging using ELK stack ( to get Log.Info messages).
      How can we see TRACE ID , SPAN ID along with Log.Info messages in KIBANA dashboard. I mean how to do the configuration of ELK+Sleuth+Zipin to get TRACEID, SPANID along with Log.Info message for a particular microservice .If you have done that video, can you please share that video link please.
      GOD BLESS YOU ....

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      @@raghuvardhansaripalli9636 this integration I didn't . let me check

    • @raghuvardhansaripalli9636
      @raghuvardhansaripalli9636 3 ปีที่แล้ว +1

      @@Javatechie Sure boss. If you don't have that video, could you please do for all youtubers whenever you have free some time. Actually i checked in youtube. No one has done this video so far. God bless you..!!!

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      @@raghuvardhansaripalli9636 I will do this

  • @priyankarawat1265
    @priyankarawat1265 4 ปีที่แล้ว +1

    creating custom zipkin servers as part of sleuth has been deprecated.

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      I didn't check , this is my old implementation

    • @priyankarawat1265
      @priyankarawat1265 4 ปีที่แล้ว +1

      @@Javatechie yes. But it is helpful :). Thank you. Please upload with upgraded version of boot as well.

  • @soubhagyakumar9309
    @soubhagyakumar9309 5 ปีที่แล้ว +1

    where is the log messages in zipkin UI those you have written using log4j

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      @soubhagya That won't display on Zipkin UI , that i added to check in console and the role of zipkin is not to display your log statement ,it just help us to keep track your API load info with the help of spanid and trace id

    • @rajivraghu9857
      @rajivraghu9857 5 ปีที่แล้ว

      @@Javatechie How do we send log4j logs to zipkin??

    • @sportstube1414
      @sportstube1414 3 ปีที่แล้ว +1

      How we can send response body values or log values of a request on zipkin UI . Is there any way.

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว +1

      We cannot miss guide use of zipikin as I already mentioned zipikin is not being used to track your application internal logs .
      It's used to track API call and it's load .

    • @sportstube1414
      @sportstube1414 3 ปีที่แล้ว +1

      @@Javatechie any suggestions that helps for me to trace service request as well as to log data of respnse body?.. By the way, your tutorials are great....hats off keep it brother.

  • @mdqamruddin
    @mdqamruddin 3 ปีที่แล้ว

    Where are the logs ???

  • @rexsam3134
    @rexsam3134 3 ปีที่แล้ว +1

    Please upgrade your videos with new Spring Boot version 2.4.1

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      Hi please checkout my microservice playlist I already explained with spring boot 2.x

  • @jagadishraj558
    @jagadishraj558 5 ปีที่แล้ว

    Seems like you are Oriya