<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by ngotzmann on Medium]]></title>
        <description><![CDATA[Stories by ngotzmann on Medium]]></description>
        <link>https://medium.com/@ngotzmann?source=rss-1e4b7eef1b32------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Vx-TiC2tjPmQWPXmgRuzGg.jpeg</url>
            <title>Stories by ngotzmann on Medium</title>
            <link>https://medium.com/@ngotzmann?source=rss-1e4b7eef1b32------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 17:02:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ngotzmann/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Basics of unit testing]]></title>
            <link>https://ngotzmann.medium.com/basics-of-unit-testing-b777ca16d20b?source=rss-1e4b7eef1b32------2</link>
            <guid isPermaLink="false">https://medium.com/p/b777ca16d20b</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[junior-developer]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[ngotzmann]]></dc:creator>
            <pubDate>Fri, 05 Apr 2024 18:45:35 GMT</pubDate>
            <atom:updated>2024-04-05T18:45:35.157Z</atom:updated>
            <content:encoded><![CDATA[<p>Some basics on unit testing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EA1z29oOFX9gPt7Cy3BpJA.jpeg" /></figure><h3>Introduction</h3><p>This article aims to explain what you should to consider when writing unit tests, It does not explain how to write unit tests in your programming language or in a certain testing framework.</p><p>With unit tests, you can detect bugs early in the development process, which reduces the cost and headache of fixing bugs when they are found in a production system. Unit tests are also the easiest and fastest tests to write as a developer, as you can write and execute them directly while writing your production code. One of the biggest advantages of unit tests is that they ensure the stability of your code. When you or someone on the team need to adjust or refactor the code, it is ensured that unwanted logic changes will be detected before the code goes into production.</p><h3>Getting started</h3><p>Your tests are code too, so treat them accordingly. Here are a few things to consider:</p><ul><li>Avoid copying and pasting variables from one test case to another; make them global.</li><li>If your test cases that are used multiple times, define them globally.</li><li>Organize your tests per test case in own methods.</li><li>Apply the same coding rules to your tests as you do to your regular code.</li></ul><p>Select a consistent naming convention for your unit tests and adhere to it. Here are some tips to follow:</p><ul><li>Ensure that your test names are unambiguous and leave no room for interpretation.</li><li>Be specific about what is being tested, and include details that help identify the context or scenario.</li><li>Choose names that clearly describe the functionality being tested</li></ul><p>You don’t necessarily need a unit testing framework. While it’s advisable for larger applications or those with plans for significant growth, for small scripts where you don’t intend to create a full-blown project, you can simply write code to test your functions. Just call them and check the output.</p><h3>What not to test</h3><p>Before we discuss what we want to test, let’s first draw the line on what not to test.</p><p>Avoid testing connections to other systems such as:</p><ul><li>Your database</li><li>3rd party systems connected via API, SDK…</li><li>Files from your file system</li></ul><p>In general, we should avoid using mocking. Often, you can achieve the desired result by splitting the part you want to test into its own method and testing it as a single isolated unit.</p><p>Avoid testing workflows in unit tests; use integration tests for these.</p><p>Do not test nested methods; instead, focus on testing isolated methods.</p><p>Generally, avoid testing performance in your unit tests, as your client PC and CI pipelines may have different specifications than your staging or production environment. Additionally, you want to test your entire process with more load than a single execution.</p><h3>What to test</h3><h4>General ideas</h4><p>Now, let’s discuss what you do want to test. Here are a few general rules:</p><ul><li>Test every method to ensure it behaves correctly when given null or an empty value.</li><li>For methods that change the state, check that the state is changed correctly and complies with the state lifecycle.</li><li>For methods that create or transform an object, test that the object looks correct, and verify that all variables are set correctly.</li><li>When validating minimum and maximum values, test the value under the minimum, at the minimum, at the maximum, and above the maximum. (a little unclear)</li></ul><h3>Security</h3><p>If your code includes security-related logic, you definitely want to test it! Here are some examples:</p><ul><li>If it is possible to upload files to your software, ensure that only the allowed MIME types are accepted and not all.</li><li>If you want to enforce HTTPS, test that HTTP is not allowed.</li><li>If your system has password strength policies, test both the positive cases and all the negative cases, to ensure compliance.</li></ul><h3>Error handling</h3><p>Testing error handling is crucial for well-written software and providing understandable errors for users. Additionally, error handling may be one of the few exceptions where we want to use mocking.</p><ul><li>Test that the text of the error message precisely describes the problem and suggests possible solutions.</li><li>Ensure that the correct exceptions are thrown and not generic ones.</li><li>Verify the correct reaction to HTTP errors; in this case, you have to use mocking when simulating an API call</li></ul><h3>Tips</h3><ul><li>If you encounter a scenario where you need to transform an API response (eg. JSON) to objects, you can save the API response on your filesystem and read it. This approach eliminates the need to make an actual API call and keeps the JSON out of your code.</li></ul><h3>Test Coverage</h3><p>Don’t fall for the test coverage trap! While it’s important to cover your validations and business logic, testing every line of code may not be necessary.</p><p>If you choose to measure the coverage of your code, include only the files or methods that you want to test and ignore everything else. Alternatively, explicitly disable coverage analysis for certain files or methods. This approach ensures that you focus on testing what is essential and prevents overlooking areas you intended to test.</p><h3>Last words</h3><p>When you start writing unit tests, you will notice that you begin to structure your code differently. You will have smaller methods that contain your logic and validation. This is a perfect opportunity to start thinking about how to structure your code more effectively and where to place different parts of your code.</p><p><em>Originally published at </em><a href="https://ngotzmann.net/en/blog/basics_of_unittesting/"><em>https://ngotzmann.net</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b777ca16d20b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS SDK S3 client for JavaScript]]></title>
            <link>https://ngotzmann.medium.com/aws-sdk-s3-client-for-javascript-da3e777234b?source=rss-1e4b7eef1b32------2</link>
            <guid isPermaLink="false">https://medium.com/p/da3e777234b</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[pitfalls]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <dc:creator><![CDATA[ngotzmann]]></dc:creator>
            <pubDate>Sat, 20 Nov 2021 18:45:16 GMT</pubDate>
            <atom:updated>2021-11-20T18:45:16.242Z</atom:updated>
            <content:encoded><![CDATA[<p>Some experience with the AWS SDK S3 client for JavaScript</p><p>Published on 20 Nov, 2021</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*09c1b-YnBiuvgnUg.png" /></figure><p>I recently worked with the <a href="https://aws.amazon.com/sdk-for-javascript/">AWS SDK S3 client for JavaScript</a> and I don’t know, but I feel like good examples and instructions regarding the functions, that the S3 client offers and what pitfalls are, are missing.</p><p>In this article I only cover functions on objects. In the perspective of S3 files and folders are both objects, and folder is an object that contains in its key a /.</p><p>First of all, there are two maintained versions of the AWS SDK, <a href="https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/welcome.html">version 2</a> and <a href="https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/">version 3</a>.<br> It is a bit confusing, because on the documentation page of version 2 they sometimes refer to <em>latest</em> version, which however means the last version of version 2.<br> Version 3 moved to a new <a href="https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/globals.html">documentation page</a>.</p><p>Also some links in the version 3 documentation refer to the version 2 documentation so be aware of it, and maybe search manual for informations in the version 3 documentation.</p><h3>First of all installation</h3><p>To use the aws-sdk you have to install it, here is the <a href="https://www.npmjs.com/package/@aws-sdk/client-s3">npm repository link</a>.</p><pre>npm install --save @aws-sdk/client-s3</pre><h3>Changes in rollup</h3><p>TL;DR: You may not have this issue, it can relate to my enviroment. By the way, I am using <a href="https://svelte.dev/">svelte</a> and rollup for building and bundling.</p><p>I had some problems with a crypto module that the AWS SDK is using. I got an error that the variable exports is not defined.</p><p>I used already the commonjs plugin, but it doesn&#39;t help.</p><pre>Uncaught ReferenceError: exports is not defined <br>  at CryptoOperation.js:2 <br>  at main.ts:25</pre><p>After a while and with help we found a dirty fix, I adjusted my rollup.conf.js and add a replace statement to define exports.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c3fed14cfef0b1c2364e71c8e01e1f1d/href">https://medium.com/media/c3fed14cfef0b1c2364e71c8e01e1f1d/href</a></iframe><h3>Rename a s3 object</h3><p>As there is no rename or move method on the s3 client, you have to copy and delete the old file (seriously no joke).</p><p><strong>Be aware that the copy will increase your used storage and can be costful.</strong></p><p>It could look like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/07ff6ff6ce9040b513c2b27a60983d48/href">https://medium.com/media/07ff6ff6ce9040b513c2b27a60983d48/href</a></iframe><h3>List top level objects in current folder</h3><p>If you just want to list the objects in the current folder, you have specify / as delimiter in the ListObjectsV2Command, but then folders will not more contained in Contents attribute of the response, but in the CommonPrefixes attribute.</p><h3>Upload file</h3><p>To upload files there is an extra library <a href="https://www.npmjs.com/package/@aws-sdk/lib-storage">aws-lib-storage</a>.<br> To use this library I needed to add <a href="https://www.npmjs.com/package/rollup-plugin-polyfill-node">nodePolyfills</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd06128eb3fc40c599dfe3b710a36730/href">https://medium.com/media/cd06128eb3fc40c599dfe3b710a36730/href</a></iframe><p>Just see the example on <a href="https://www.npmjs.com/package/@aws-sdk/lib-storage">npmjs @aws-sdk/lib-storage</a>.</p><h3>Delete files</h3><p>If you want to delete a folder with content, you first have to delete the content of the folder.<br> For this the command DeleteObjectsCommand exists. Search for all objects inside a folder and give the list to this command.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa08e57599c778a65dde87d6e4f740c0/href">https://medium.com/media/fa08e57599c778a65dde87d6e4f740c0/href</a></iframe><p>After you have done this, just delete the folder.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/88ef00cb481660c3ef4b9dd260c79891/href">https://medium.com/media/88ef00cb481660c3ef4b9dd260c79891/href</a></iframe><h3>Search files</h3><p>Sadly there is no full text search, you can just search for a prefix with the ListObjectsV2Command.<br> Like here:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5f19e7e513c4ed156323f20738f5bf91/href">https://medium.com/media/5f19e7e513c4ed156323f20738f5bf91/href</a></iframe><h3>Download files</h3><p>Download files from s3 is pretty easy, but you need to use a signedUrl.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/74aeefa88dff661f2d011199ce9a0275/href">https://medium.com/media/74aeefa88dff661f2d011199ce9a0275/href</a></iframe><p><em>Originally published at </em><a href="https://ngotzmann.net/en/blog/aws_sdk/"><em>https://ngotzmann.net</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da3e777234b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java vs JavaScript]]></title>
            <link>https://ngotzmann.medium.com/java-vs-typescript-5715187c58e6?source=rss-1e4b7eef1b32------2</link>
            <guid isPermaLink="false">https://medium.com/p/5715187c58e6</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[ngotzmann]]></dc:creator>
            <pubDate>Sat, 16 Oct 2021 17:56:29 GMT</pubDate>
            <atom:updated>2021-11-08T20:02:20.251Z</atom:updated>
            <content:encoded><![CDATA[<p>Why you may should change your programming language</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zpwAkS4b8rpZgazQ.png" /></figure><p>I recently applied for a job where I will be developing frontend and backend applications in TypeScript.<br> So why did I change from Java to TypeScript? Well I give a shit on programming languages, they are just a tool to implement great stuff.</p><p>I mean in general it is nice to have a language where you are fast and able to implement your ideas of a tool, or automate some stuff, but in my opinion a programming language has not to decide what job you will take.<br> When a job offer sounds interesting, because they use technologies you want to use, there are some good colleges, or you can identify with the companies visions and wanna work with them on that, don’t reject the job offer just because it is not your well-known language.</p><p>The most programming languages are very similar to each other, in my opinion there is a lot of other important stuff, like the software architecture, the design of single software components and the whole universe around it, like identity management, the deployment, observability, business intelligence.<br> They all use some sort of package management, you write unit tests in all languages and mostly develop object orientated or structural, you use patterns…</p><p>do not hang too much on your programming language.</p><p><em>Originally published at </em><a href="https://ngotzmann.net/en/blog/javavsts/"><em>https://ngotzmann.net</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5715187c58e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I got into observability]]></title>
            <link>https://ngotzmann.medium.com/how-i-got-into-observability-4db99e8d5406?source=rss-1e4b7eef1b32------2</link>
            <guid isPermaLink="false">https://medium.com/p/4db99e8d5406</guid>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[prometheus]]></category>
            <dc:creator><![CDATA[ngotzmann]]></dc:creator>
            <pubDate>Thu, 08 Apr 2021 14:16:50 GMT</pubDate>
            <atom:updated>2021-04-08T14:16:50.346Z</atom:updated>
            <content:encoded><![CDATA[<p>Why an application monitoring is not enough and what an observability plattform is</p><h3>tl;dr</h3><p>This post is not a guide to implement an observability platform.<br> It covers what I think are some basics to understand what observability actually is and where it separates itself from monitoring systems and I also document my experiences here.</p><p>There is a very good article and talk by Grafana for the implementation:<br><a href="https://grafana.com/blog/2020/03/31/how-to-successfully-correlate-metrics-logs-and-traces-in-grafana/">How to successfully correlate metrics logs and traces in grafana</a>, the video link in the article is not available at the given URL, but it is on a fosdem server: <a href="https://mirror.as35701.net/video.fosdem.org/2020/UD2.120/tracing_grafana.webm">tracing grafana</a>.</p><h3>Introduction</h3><p>After depedecy updates in our software, a memory leak has occurred. Almost at the same time, some unwanted behaviour occurred at runtime in some services after the implementation of some features.<br> As there was no insight into the application at runtime, we created heapdumps of the running jvm and analysed them with the <a href="https://www.eclipse.org/mat/">eclipse memory analyzer</a>.<br> Attempts were made to recreate the problem locally, we analysed the application with open jmx ports and <a href="https://visualvm.github.io/">visualvm</a>.</p><p>After the problems were solved, the desire arose to have a runtime insight in our applications, to analyse runtime behaviors and problems…</p><p>After some meetings I got a bunch of requirements:</p><ul><li>Monitoring of JVM CPU Load, RAM/Heap</li><li>Performance Monitoring</li><li>Count of exceptions</li><li>Count of requrests</li><li>Top 5 requests/error messages…</li><li>Utilization of the DB connection</li></ul><p>To implement some of these requirements, I had to choose an <em>application monitoring</em> tool. Since we use the ElasticStack for some business analysis and log aggregation, my first choice was Elastic, also because they have a brand new (but beta) observability feature.<br> After an evaluation phase, and tests with APM-Server and the beats components, I decided to try out other tools. Mainly because these features are in a too early stage of beta and there was no opportunity to send <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html">spring actuator</a> metrics by <a href="https://micrometer.io/">micrometer</a> to Elastic, there is a github issue, but nothing useful at the time this post was published.</p><p>After some discussions about AWS CloudWatch, we decided to do not use it, because we didnt want to have a vendor lock to AWS.</p><p>Sooo there are prometheus and grafana as the defacto standard of observability in cloud native.<br> A simple setup with prometheus and grafana is incredibly easy, so that I could quickly start to evaluate prometheus and grafana. After some evaluation time, I understood that there must me more than just <em>monitoring for an application</em> and this is how I discovered the topic of observability…</p><p>A colleague recommended me to read some chapters of googles SRE books, to get more into the monitoring topic.</p><p>So I learned some important basics about monitoring, like blackbox &amp; wihtebox monitoring and that I need more data for my requirements than just metrics.</p><h3>Blackbox &amp; Whitebox</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/0*JX49D5BpCEm622YR.png" /></figure><p><strong>Blackbox monitoring</strong> just views a system as blackbox and it will be just monitored from <em>outside</em>.<br> Symptoms like an increased RAM/CPU consumption become visible, also the availability of a system can be monitored by his interfaces.</p><p><strong>Whitebox monitoring</strong> enables the detection of future problems and also allows analyzing the current runtime environment.<br> As example, in a blackbox monitoring we can see that there is an application which does not repsonse, in the whitebox monitoring we will be able to see (at best) why, maybe because there are to many connection to the database or a lot of threads are in blocked state.</p><p>To have a deeper look at an application and a better analysis opportunity, we need more data than just metrics…</p><h3>Observability</h3><p>From my understanding, whitebox monitoring is observability and blackbox monitoring is the “classical” monitoring with for example <a href="https://checkmk.com/">checkmk</a>.<br> Observability drills down into the “what” and “why” of the application, by providing granular and contextual insight into it.</p><p>It can start with a symptom pinpointed by a high-level metric.<br> Your are able to break it down and go from metric to the traces where you can analyse in which span the symptom, like a slow request, occurs.<br> As in a span can happen a lot, you can go from traces to logs an review the log statements and times for a deep analysis.</p><p>Sounds magic?<br> It is (when the observability system is right configured and you get the data ;) ).</p><p>Observability can be divided into three pillars.</p><h4>The three pillars of observability</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/0*adSgy99Ny9Xe43on.png" /></figure><p><strong>Metrics</strong></p><p>Metrics are numeric value measured over a period of time, like the average CPU consumption from the last five minutes. They are great for monitoring, if a number gets to high an alert can be triggered…<br> However, since metrics are aggregated data, they cannot be used to measure everything so easily. The <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html">spring actuator (healt/metric endpoint)</a>, publishes how much log statements in which log level was logged.<br> If we visualise these metric with grafana, the output looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BMrPEKLHHKnAC00f.png" /></figure><p>As we can see in the picture, between 12:51 and 12:52 there schould be around 0.00500 log messages logged, since metrics are aggregated we cannot say exactly how many log statements were actually logged.<br> Soo metrics are great, but you cannot do anything with it, in this case it will be better to visualise from the log data.</p><p>To establish a standard format, there is a project called <a href="https://openmetrics.io/">openmetrics</a>.</p><p><strong>Logs</strong><br> “A log is a message, or a collection of messages. They usually have a timestamp attached. Individual logs may or may not be related to each other.”<br> Quote from: <a href="https://docs.honeycomb.io/learning-about-observability/events-metrics-logs/">honeycomb events metrics logs</a></p><p><strong>Traces</strong><br> A trace is a span that represents an execution of code. They have an ID, they can be named and they show how long a execution of code needs.<br> An image says more than 1000 words… So here is an image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FGBJ-7McWP4l39Ec.png" /></figure><p><em>Source: </em><a href="https://opensource.com/article/18/9/distributed-tracing-microservices-world"><em>distributed tracing microservices world</em></a></p><p>It is often spoken of “distributed tracing”, in a distributed system traces are much more important for analysis. But in a monolithic system, traces are important for easy finding latency issues, too and should not be underestimated.</p><p>As for metrics, a standard for tracing exists: <a href="https://opentracing.io/">opentracing</a>, but opentracing was merged with <a href="https://opencensus.io/">opencensus</a> to <a href="https://opentelemetry.io/">opentelemetry</a>.</p><p><strong>Correlation Between Pillars</strong></p><p>The interessting part of observability is the correlation between pillars.<br> To recognize correlations between the individual data sources, each data source must include an ID that is the same across the other data sources.</p><p>Thereby we are able to look at the logs of the metric to find out, why as example the CPU usage is increasing. Or look from traces to their logs or metrics…<br> While logs of metrics are just app data, logs or metrics of traces are always request scoped. Through the correlation of pillars we get maximum visibility into the behavior of the system.</p><h3>Implementation</h3><p>As I have mentioned it in the tl;dr, there is a great article for implementation of the observability plattform: <a href="https://grafana.com/blog/2020/03/31/how-to-successfully-correlate-metrics-logs-and-traces-in-grafana/">how to successfully correlate metrics logs and traces in grafana</a>.</p><p>But I want to say a little bit about it. There are a lot of good dasboards for any language or tools in the <a href="https://grafana.com/grafana/dashboards">grafana dashboard marketplace</a>. I decided to create a new dashboard (with exiting panels of other dashboards), to create a whitebox monitoring dashboard for our use case. Furthermore I installed a plugin to use the <a href="https://grafana.com/grafana/plugins/camptocamp-prometheus-alertmanager-datasource/">prometheus alertmanager as datasource</a> and I imported a <a href="https://grafana.com/grafana/dashboards/8010">dashboard</a> for visualisation of the alerts.</p><p>At the moment there is unfortunately no possibility to integrate elasticsearch with logs in grafana, so we have to use <a href="https://grafana.com/oss/loki/">Loki</a>, to correlate metrics, traces and logs.<br> As we use spring with logback, I searched for a soultion and found the <a href="https://github.com/loki4j/loki-logback-appender">loki4j, loki logback appender</a>. Which works very good and without problems, but has too few stars on github, so do your thing.</p><p>In the article from grafana, <a href="https://www.jaegertracing.io/">jaeger</a> is used as tracing software. We have already integrated <a href="https://zipkin.io/">zipkin</a> and grafana offers a zipkin integration, so we decided to use zipkin instead of jaeger.</p><h3>Conclusion</h3><p>I have followed the article from grafana to build up an observability plattform, I think that Elastic will come in near future with a powerfull alternative to grafana, otherwise there are enough other good solutions like honeycomb, datadog…<br> The next challenge is to integrate the usage of the plattform in the development process, to identify potentially problems in the development process and not later in production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*jKN0J9AA79F6dP6w.png" /></figure><p>In the devops lifecycle, there is already a part for “monitoring”. As we work in two weeks sprints, we will check grafana before our review meeting and check whether there are unexpected behaviors. I think the comparison of time periods would be a killer feature.</p><p>Furthermore an observability plattform smoothes the way to SLOs, with which your application qualitity can be improved. We will definitly define some SLOs after some acclimation time.</p><p>Here are two chapters of googles SRE books to SLOs:</p><p><em>Originally published at </em><a href="https://ngotzmann.net/en/blog/observability/"><em>https://ngotzmann.net</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4db99e8d5406" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>