{"id":17,"date":"2020-02-05T10:00:00","date_gmt":"2020-02-05T09:00:00","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/"},"modified":"2022-06-10T16:36:12","modified_gmt":"2022-06-10T14:36:12","slug":"tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/","title":{"rendered":"Tracing performance of backend services written on Java with Sleuth, Zipkin &#038; ELK stack"},"content":{"rendered":"\t\t\t\t<div class=\"wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-619f927c      \"\n\t\t\t\t\tdata-scroll= \"1\"\n\t\t\t\t\tdata-offset= \"30\"\n\t\t\t\t\tstyle=\"\"\n\t\t\t\t>\n\t\t\t\t<div class=\"uagb-toc__wrap\">\n\t\t\t\t\t\t<div class=\"uagb-toc__title\">\n\t\t\t\t\t\t\tTable Of Contents\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uagb-toc__list-wrap \">\n\t\t\t\t\t\t<ol class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#sleuth\" class=\"uagb-toc-link__trigger\">Sleuth<\/a><li class=\"uagb-toc__list\"><a href=\"#zipkin\" class=\"uagb-toc-link__trigger\">Zipkin<\/a><li class=\"uagb-toc__list\"><a href=\"#elk\" class=\"uagb-toc-link__trigger\">ELK<\/a><li class=\"uagb-toc__list\"><a href=\"#conclusion\" class=\"uagb-toc-link__trigger\">Conclusion<\/a><\/ol>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\n\n<p><strong>Logging<\/strong> and <strong>monitoring<\/strong> make up a very important part of any \u201chigh-load\u201d <span id=\"urn:enhancement-b35dd2fb\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span> nowadays. The goal of this article is to provide an overview of what can be achieved in order to organise efficient logging and tracing of modern web <span id=\"urn:enhancement-aaa41984\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> written on <strong><span id=\"urn:enhancement-2db2b636\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/java_software_platform\">Java<\/span><\/strong>. A few tools configured to work together bringing great value to the <span id=\"urn:enhancement-324d7f57\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span>.<\/p>\n\n\n\n<p>In modern web <span id=\"urn:enhancement-29793d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span>, especially if we talk about large enterprise projects, we can notice a very strong trend. It\u2019s called <strong><span id=\"urn:local-annotation-943436\" class=\"textannotation disambiguated\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/microservices\">microservices<\/span><\/strong>. More and more huge monolithic <span id=\"urn:enhancement-5c475bbd\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> on the <span id=\"urn:enhancement-2e40844d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/front_and_back_ends\">backend<\/span> side are being split into multiple small, reliable and more maintainable parts &#8211; so-called microservices. Taking this approach isn\u2019t an easy thing to do if you have to refactor a large <span id=\"urn:enhancement-232b8dd1\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span>, but it pays off ultimately: it\u2019s much easier to test, maintain, update and <span id=\"urn:enhancement-d578a78a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_deployment\">deploy<\/span> separate small <span id=\"urn:enhancement-8fd36d51\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span>. That\u2019s why this approach is conquering the world of <span id=\"urn:enhancement-bce6a92e\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/front_and_back_ends\">backend<\/span> today.<\/p>\n\n\n\n<p>But with all those listed benefits, this way of designing <span id=\"urn:enhancement-ea4f2f03\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> also brings potential problems and challenges that we have to consider. They\u2019re mostly related to the fact that the context of the whole <span id=\"urn:enhancement-10eab6f3\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span> is spread across the microservices. Because of that, it can be more complicated to <span id=\"urn:enhancement-ef1eaed2\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/debugging\">debug<\/span> the <span id=\"urn:enhancement-5baa477a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span> and find out where exactly errors appear. There is quite a common way to handle errors efficiently and check <span id=\"urn:enhancement-71b07bc3\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/performance\">performance<\/span> at the same time. It was the main topic of the talk \u201c<b>Tracing <span id=\"urn:enhancement-59e1c2f9\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/performance\">performance<\/span> of your service calls with some help of Sleuth, Zipkin &amp; ELK<\/b>\u201d, given by <b>Rafaela Breed<\/b> at <strong>Codemotion Amsterdam 2019<\/strong>.<\/p>\n\n\n\n<p>To achieve clear visibility of what is going on in the whole <span id=\"urn:enhancement-b903c15a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span>, working on multiple microservices, first of all, we need to find a way to trace every request going through the chain of these microservices communicating to each other. And here the first tool in the list can help us.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-sleuth\">Sleuth<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__1-scaled.jpg\" alt=\"\"\/><\/figure><\/div>\n\n\n\n<p><b>Sleuth<\/b> is a part of <span id=\"urn:enhancement-85739534\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/java_software_platform\">Java<\/span>\u2019s Spring <span id=\"urn:enhancement-88f1a294\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> and it\u2019s heavily inspired by such tools as Dapper, Zipkin, and HTrace. Two main responsibilities of Sleuth that we\u2019re interested in are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It ensures that every request event initiated in a Spring application starts a new trace and creates a unique trace ID.<\/li><li>It creates a span on every internal event, which also comes with a unique ID. It\u2019s being destroyed once the event is finished.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__2.png\" alt=\"\"\/><\/figure><\/div>\n\n\n\n<p>As you can see from the diagram above, trace ID stays the same across the whole flow of the <span id=\"urn:enhancement-4187f632\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span>, but span IDs are different on each step.<\/p>\n\n\n\n<p>So, let\u2019s see how we can add Sleuth into a <span id=\"urn:enhancement-eb533b04\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span>. It\u2019s actually pretty straightforward, we just need to add it as a new dependency. In the case where the <span id=\"urn:enhancement-c86ad90f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span> uses <span id=\"urn:enhancement-83baa772\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/apache_maven\">Maven<\/span> as a dependency manager (<span id=\"urn:enhancement-4663bb82\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/gradle\">Gradle<\/span> is also supported), the code will look like this:<script src=\"https:\/\/pastebin.com\/embed_js\/bKUT1zL3\"><\/p>\n\n\n\n<script src=\"https:\/\/pastebin.com\/embed_js\/bKUT1zL3\"><\/script>\n\n\n\n<p>The easiest way of integrating Sleuth into a <span id=\"urn:enhancement-8602de38\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span> will be its setup to all the microservices. In this case, none of the extra work is required because Sleuth will automatically pass the trace ID to the next service.<\/p>\n\n\n\n<p>Once we\u2019ve configured Sleuth in our <span id=\"urn:enhancement-fb8bdb4c\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span> we can, let\u2019s say, filter all logs by the trace ID and see only those related to the specific \u201csession\u201d. It\u2019s already much better in terms of <span id=\"urn:enhancement-7939c64d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/debugging\">debugging<\/span>, but we can go further. Here\u2019s where <b>Zipkin<\/b> comes handy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-zipkin\">Zipkin<\/h2>\n\n\n\n<p>Zipkin is a \u201cdistributed tracing system\u201d which consists of <span id=\"urn:enhancement-9fa7432f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/client_computing\">client<\/span> and <span id=\"urn:enhancement-2cd3e933\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/server_computing\">server<\/span> parts. The <span id=\"urn:enhancement-c1758cfe\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/server_computing\">server<\/span> part is a Spring Boot <span id=\"urn:enhancement-589b7458\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span> that receives information from the <span id=\"urn:enhancement-3039ce41\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/client_computing\">client<\/span> part and displays it in a nice format. In other words, it\u2019s a UI dashboard that can visualise the tracing data in a more useful way.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__3.png\" alt=\"\"\/><\/figure><\/div>\n\n\n\n<p>Look how easy it is to observe the <span id=\"urn:enhancement-9e76d99e\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span>\u2019s flow in this representation. We can immediately see which service is slow and where are the bottlenecks.<\/p>\n\n\n\n<p>The quickest way to get started with Zipkin <span id=\"urn:enhancement-6e0853fd\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/server_computing\">server<\/span> is to run it from the <a href=\"https:\/\/hub.docker.com\/r\/openzipkin\/zipkin\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">official Docker image<\/a>. This image can be running locally, default <span id=\"urn:enhancement-542f6ff7\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/uniform_resource_locator\">URL<\/span> is going to be <a href=\"http:\/\/localhost:9411\/zipkin\">http:\/\/localhost:9411\/zipkin<\/a><\/p>\n\n\n\n<p>Zipkin <span id=\"urn:enhancement-c3e1252d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/client_computing\">client<\/span> is integrating into a <span id=\"urn:enhancement-a5b16067\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span> as a dependency, in the same way as Sleuth:<\/p>\n\n\n\n<script src=\"https:\/\/pastebin.com\/embed_js\/VG9T4Dg2\"><\/script>\n\n\n\n<p>On the preview above we can see an example of happy flow. There are no errors and all the services are coloured blue. In case of errors, the services and spans become red. If you click on the spans you will get a popup window with the extra information. It might be helpful to filter all <span id=\"urn:enhancement-b1ca4bb3\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data_logger\">logs<\/span> by the selected span.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__4.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>It\u2019s also important to mention that Zipkin by default is configured in a way that it <span id=\"urn:enhancement-9149c3b3\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data_logger\">logs<\/span> only one of ten requests. It\u2019s done with <code>ProbabilityBasedSampler<\/code> and controlled with the setting <code>spring.sleuth.sampler.probability<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-elk\">ELK<\/h2>\n\n\n\n<p>Last but not least, it is worth mentioning the <strong>ELK stack<\/strong>. ELK stands for <b><span id=\"urn:enhancement-8a77217\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/elasticsearch\">Elasticsearch<\/span>, Logstash, and Kibana<\/b>. They are all products of the company Elastic, very often used together, forming this well-know stack.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><b>Elasticsearch<\/b>. RESTful search and analytics engine which is also responsible for data storage.<\/li><li><b>Logstash<\/b>. Pipelines that are collecting, parsing and transforming all incoming data.<\/li><li><b>Kibana<\/b>. Web interface representing stored data. A place where you go to check logs.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>Here is a quick overview of how you can monitor your <span id=\"urn:enhancement-61d9d463\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span> <span id=\"urn:enhancement-b009b07c\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/performance\">performance<\/span> and what you can achieve with these tools. It\u2019s mostly suitable for <span id=\"urn:enhancement-c1a36e19\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_developer\">developers<\/span> who create <span id=\"urn:enhancement-ae70926b\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/java_software_platform\">Java<\/span> <span id=\"urn:enhancement-d79dd2d4\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/front_and_back_ends\">backend<\/span> <span id=\"urn:enhancement-14449b98\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> but the generic knowledge about logging and tracing can be extremely useful for every <span id=\"urn:enhancement-4f6b09c0\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_developer\">developer<\/span>. Because logging and monitoring make a very important part of any \u201chigh-load\u201d <span id=\"urn:enhancement-edbc8723\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span> nowadays.<\/p>\n\n\n\n\n\n<p class=\"gb-headline gb-headline-f9b41d1f gb-headline-text\">Recommended article: <a href=\"https:\/\/www.codemotion.com\/magazine\/backend-dev\/is-it-always-best-to-reduce-code-lines\/\" target=\"_blank\" aria-label=\"Is it Always Best to Reduce Code Lines? (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">Is it Always Best to Reduce Code Lines?<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sleuth, Zipkin and the ELK stack: three different approaches to tracing performance of Java backend services, especially useful in the era of microservices.<\/p>\n","protected":false},"author":6,"featured_media":18,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":4,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[36],"tags":[77,52],"collections":[],"class_list":{"0":"post-17","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-backend","8":"tag-codemotion-amsterdam","9":"tag-java","10":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Java services performance with Sleuth, Zipkin &amp; ELK stack - Codemotion<\/title>\n<meta name=\"description\" content=\"Sleuth, Zipkin and the ELK stack: three different approaches to tracing performance of Java backend services, especially useful in the era of microservices.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tracing performance of backend services written on Java with Sleuth, Zipkin &amp; ELK stack\" \/>\n<meta property=\"og:description\" content=\"Sleuth, Zipkin and the ELK stack: three different approaches to tracing performance of Java backend services, especially useful in the era of microservices.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-05T09:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-10T14:36:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1013\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Yuri Drabik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yuri Drabik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/\"},\"author\":{\"name\":\"Yuri Drabik\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/ff02597ce9f05cd23208147d723ff906\"},\"headline\":\"Tracing performance of backend services written on Java with Sleuth, Zipkin &#038; ELK stack\",\"datePublished\":\"2020-02-05T09:00:00+00:00\",\"dateModified\":\"2022-06-10T14:36:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/\"},\"wordCount\":936,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg\",\"keywords\":[\"Codemotion Amsterdam\",\"Java\"],\"articleSection\":[\"Backend\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/\",\"name\":\"Java services performance with Sleuth, Zipkin & ELK stack - Codemotion\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg\",\"datePublished\":\"2020-02-05T09:00:00+00:00\",\"dateModified\":\"2022-06-10T14:36:12+00:00\",\"description\":\"Sleuth, Zipkin and the ELK stack: three different approaches to tracing performance of Java backend services, especially useful in the era of microservices.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg\",\"width\":1013,\"height\":675,\"caption\":\"sdr\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Backend\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/backend\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Tracing performance of backend services written on Java with Sleuth, Zipkin &#038; ELK stack\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/ff02597ce9f05cd23208147d723ff906\",\"name\":\"Yuri Drabik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/82097622af0861093d3bd7b1d29bc5336814b972a112b1b82c97afe64a3e7c51?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/82097622af0861093d3bd7b1d29bc5336814b972a112b1b82c97afe64a3e7c51?s=96&d=mm&r=g\",\"caption\":\"Yuri Drabik\"},\"description\":\"Started as a frontend web developer, constantly expanding the range of interests in tech. Author of the blog JavaScript Room\",\"sameAs\":[\"http:\/\/roomjs.com\",\"https:\/\/www.instagram.com\/room_js\/\"],\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/yuri-drabik\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Java services performance with Sleuth, Zipkin & ELK stack - Codemotion","description":"Sleuth, Zipkin and the ELK stack: three different approaches to tracing performance of Java backend services, especially useful in the era of microservices.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/","og_locale":"en_US","og_type":"article","og_title":"Tracing performance of backend services written on Java with Sleuth, Zipkin & ELK stack","og_description":"Sleuth, Zipkin and the ELK stack: three different approaches to tracing performance of Java backend services, especially useful in the era of microservices.","og_url":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2020-02-05T09:00:00+00:00","article_modified_time":"2022-06-10T14:36:12+00:00","og_image":[{"width":1013,"height":675,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg","type":"image\/jpeg"}],"author":"Yuri Drabik","twitter_card":"summary_large_image","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Yuri Drabik","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/"},"author":{"name":"Yuri Drabik","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/ff02597ce9f05cd23208147d723ff906"},"headline":"Tracing performance of backend services written on Java with Sleuth, Zipkin &#038; ELK stack","datePublished":"2020-02-05T09:00:00+00:00","dateModified":"2022-06-10T14:36:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/"},"wordCount":936,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg","keywords":["Codemotion Amsterdam","Java"],"articleSection":["Backend"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/","url":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/","name":"Java services performance with Sleuth, Zipkin & ELK stack - Codemotion","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg","datePublished":"2020-02-05T09:00:00+00:00","dateModified":"2022-06-10T14:36:12+00:00","description":"Sleuth, Zipkin and the ELK stack: three different approaches to tracing performance of Java backend services, especially useful in the era of microservices.","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg","width":1013,"height":675,"caption":"sdr"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/tracing-performance-of-backend-services-written-on-java-with-sleuth-zipkin-elk-stack\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"Backend","item":"https:\/\/www.codemotion.com\/magazine\/backend\/"},{"@type":"ListItem","position":3,"name":"Tracing performance of backend services written on Java with Sleuth, Zipkin &#038; ELK stack"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/ff02597ce9f05cd23208147d723ff906","name":"Yuri Drabik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/82097622af0861093d3bd7b1d29bc5336814b972a112b1b82c97afe64a3e7c51?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/82097622af0861093d3bd7b1d29bc5336814b972a112b1b82c97afe64a3e7c51?s=96&d=mm&r=g","caption":"Yuri Drabik"},"description":"Started as a frontend web developer, constantly expanding the range of interests in tech. Author of the blog JavaScript Room","sameAs":["http:\/\/roomjs.com","https:\/\/www.instagram.com\/room_js\/"],"url":"https:\/\/www.codemotion.com\/magazine\/author\/yuri-drabik\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header-600x400.jpg","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header-600x600.jpg","author_info":{"display_name":"Yuri Drabik","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/yuri-drabik\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg",1013,675,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header-150x150.jpg",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header-300x200.jpg",300,200,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header-768x512.jpg",768,512,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg",1013,675,false],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg",1013,675,false],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg",1013,675,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header.jpg",100,67,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header-180x128.jpg",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header-896x504.jpg",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header-400x225.jpg",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header-600x400.jpg",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/08\/tracing_performance__header-600x600.jpg",600,600,true]},"uagb_author_info":{"display_name":"Yuri Drabik","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/yuri-drabik\/"},"uagb_comment_info":0,"uagb_excerpt":"Sleuth, Zipkin and the ELK stack: three different approaches to tracing performance of Java backend services, especially useful in the era of microservices.","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":10,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":18004,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/17\/revisions\/18004"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/18"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=17"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}