Tracing the API calls in Your Helidon Application with Jaeger
While building applications that comprises of multiple microservices, it is essential to have a mechanism in place to collect and analyze the details of API calls, timing data needed to troubleshoot latency problems and logging error generated from API calls. Jaeger is one such solution and used for monitoring and troubleshooting application built following microservice based architecture with following capabilities:
- Distributed context propagation
- Distributed transaction monitoring
- Root cause analysis
- Service dependency analysis
- Performance / latency optimization
Eclipse MicroProfile, OpenTracing and Jaeger
As there are multiple tracing solutions out there similar to Jaeger(such as Zipkin), it is really good to avoid vendor lock-in by having some standardization around APIs that work with different providers.The OpenTracing addresses this part of the problem, it a vendor-agnostic API to help developers easily instrument tracing into their code base without worrying about underlying tracing implementation. Good news is that Eclipse MicroProfile has standardized the use of OpenTracing API in the stack. You can find more details here: https://github.com/eclipse/microprofile-opentracing . In nutshell, you can switch between various tracing implementations without making any major code change in your application. The changes are limited to making some config entries in the application depending upon the tracing provider(and your customization requirements) and then of course, using the right dependency based on the vendor.
Helidon MP and Jaeger
In this post I am sharing simple Helidon MicroProfile based application that uses Jaeger to trace the API calls. Heres is the link to the official doc :https://helidon.io/docs/latest/#/tracing/03_jaeger
The complete source used for building this example is available here: https://github.com/jobinesh/cloud-native-applications/tree/master/helidon-example-mp-jaeger . As you have noticed, this is a regular simple Helidon MP application. That said, however, a couple of things thing that you my find interesting in this example application:
- Dependency to helidon-tracing-jaeger in the pom. Here is the pom used for this example: https://github.com/jobinesh/cloud-native-applications/blob/master/helidon-example-mp-jaeger/pom.xml
- Jaeger Tracing Config in the application.yaml: https://github.com/jobinesh/cloud-native-applications/blob/master/helidon-example-mp-jaeger/src/main/resources/application.yaml
- The org.eclipse.microprofile.opentracing.Traced annotation: This allows fine-tuned control over which classes and methods create OpenTracing spans. More details here:http://download.eclipse.org/microprofile/microprofile-2.0-javadocs-test/apidocs/org/eclipse/microprofile/opentracing/Traced.html. The following GreetResource class from this example uses this annotation (specified at class level): https://github.com/jobinesh/cloud-native-applications/blob/master/helidon-example-mp-jaeger/src/main/java/io/helidon/examples/mp/jaeger/GreetResource.java
How to run this example?
The detailed steps are available here:
Thanks for sharing useful information.. we have learned so much information from your blog....
ReplyDeleteMicroservices Online Training
Microservices Training in Hyderabad
good and effective job
ReplyDeletePHP Training in Chennai | Certification | Online Training Course | Machine Learning Training in Chennai | Certification | Online Training Course | iOT Training in Chennai | Certification | Online Training Course | Blockchain Training in Chennai | Certification | Online Training Course | Open Stack Training in Chennai |
Certification | Online Training Course
http://globexdocuments.co//
ReplyDeletehttp://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
ReplyDeletehttp://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
http://globexdocuments.co//
An overwhelming web journal I visit this blog, it's unfathomably amazing. Unusually, in this present blog's substance made inspiration driving truth and reasonable. The substance of data is enlightening.
ReplyDeleteFull Stack Course Chennai
Full Stack Training in Bangalore
Full Stack Course in Bangalore
Full Stack Training in Hyderabad
Full Stack Course in Hyderabad
Full Stack Training
Full Stack Course
Full Stack Online Training
Full Stack Online Course
Thanks for giving great kind of information. So useful and practical for me. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge.
ReplyDeleteJava Training in Chennai
Java Training in Bangalore
Java Training in Hyderabad
Java Training
Java Training in Coimbatore
nice
ReplyDeleteHow can I pass these tracing properties dynamically, eg: host and port properties
ReplyDeleteI found your blog on Google and read a few of your other posts. I just added you to my Google News Reader. You can also visit API Development And Integration for more Metricoid Technology Solutions related information and knowledge, Keep up the great work Look forward to reading more from you in the future.
ReplyDeleteThanks for sharing the best information and suggestions, it is very nice and very useful to us. I appreciate the work that you have shared in this post. Keep sharing these types of articles here.work from home productivity monitoring tools USA
ReplyDelete