Swapnil Kotwal
I will talk about the basic differences of it. And I also have one of the interesting findings over here. Observability means you need to make your system observable. And then it becomes a monitorable. All right. Anything that is we can monitor it. In observability you will see what is my system is doing? In monitoring is my system is working or not? The most beautiful part of it is when there is some event or something happens, in case of Open Telemetry, it emits the traces or logs or metrics rather than the other platforms we have to constantly keep on pulling on a certain intervals that whether I have something to get it at the representation to it. In monitoring, mostly traces are not there. The logs and events metrics over there. But there are again some of the challenges like it won't scale that much that we want it to scale. When your system are growing you need that proper observability. That is how it differs. In case of monitoring, if there is something wrong, that is you got an observability to use that data to tell what is the wrong, how it happened, why it happened. You can debug the things without going or touching the platform. You will have a data which will tell you the whole story that what exactly is wrong with your system? Let me see how this Open Telemetry came into the picture. The brief history is like Uber was doing its research for many years. And it come up with the open source project called Open Tracing. It was mostly in the specifications how your client side platform should do the instrumentation for your source code. And other side Google and other companies were also working on Open Census project, they were bit ahead, then Open Tracing where they were trying to define the specification interfaces as well as the implementation as well. And data collection exporters also they come up with it. Around 2019 they came together, they joined the process, and they form one common open source project called Open Telemetry. Open Telemetry is the second largest CNC project at this moment after Kubernetes. And that is how the Active community did have. Okay, so let's see why we need the observability. In the mean time to reproduce the issue or to act on that issue. Whatever testing burden that you have, you want to reduce that? The full control of it that you can achieve using the Open Telemetry. These are the some topics I just listed it out. You can go collect that data. You can have one system that unifies yours or specs. Say for example some of your microservices are running on Azure. Some of them are running on GCP, some of them are on AWS. And maybe they are written in different programing language. If you are not having one common solution, if they are not compatible with the vendors and platforms and the programing languages, you won't able to streamline the whole system. You won't able to see that big picture. And that's where Open Telemetry came into the picture that they almost all programing languages support the standards and protocols are the same vendor neutral, platform agnostic, and even programing language libraries are also available, which is very systematic across the platforms. There are one of the representation tools that Open Telemetry have Jaeger which provides you how the traces look like. And how you can look at it to solve it. I will talk about it on an actual example. Say for example, this is how e-commerce, any website look like, right? When you have one of the front-end that is a web browser, which basically you are trying to purchase something which you goes to checkout service then, the shipping service then it goes to the payment and it adds to the cart. This is how it sends the confirmation email. And you need to see how this journey of that particular request happened. Is there anyone all you need to find? That is how if that service you want to see the traces came into the picture. If you look at this waterfall tree, it actually had some time. And the data type what kind of request it was, which kind of microservice it has and things like that. And how much time was spent by that particular request on that particular method or that microservice as a whole? This is the representation of. This is all thing we call that the trace and the time taken by the trace or the request to complete. And the bifurcation of it is underneath. Like whatever the microservice it was, it has got some functions and things like that. You would have to take care of it doing the programming or instrumenting it so that we'll see. In similar fashion, say for example, you also want to see the metrics of it. In case of you see there are some lag happening at checkout service. You need a metrics to see okay if there is CPU reaching to 100%. And then only you would got to know, I need to look into it. I need to increase the CPU because maybe the heap size like this. In similar fashion, if there is any new code changes happen and there are lot many 500 requests being served from the front end. Those things will tell you the metrics. In case of logs say for example if there is anything happen okay, what is exactly happened? The logs tell the story, there are something wrong with that checkout service because the website is running out of memory and it is not able to serve the incoming requests. You would see those logs, but you need to have these all three pillars unified. You need to know their correlation. You don't have to do it manually. And that's the basically, we are going to solve over here. It's not a microscope. It's the clarity under that microscope. What exactly happening with it. That is the word the data being emitted from the microservices how data collection happens. There are standard agents and cloud integration that Open Telemetry have. It also have two types of instrumentation. You can do manual instrumentation and instrumentation where you can actually do modification traces log metrics. Or you can actually use their libraries to do auto instrumentation as well. There are ways you can use a low code or no code to do your instrumentation and emitting those spaces, there is no cardinality limits. That's the beauty of it. It will reduce the burden of any company which is looking for this observability. This is one of the few parts where there were different libraries, implementation, data structure, and format were there for each of these pillar tracing, metrics, and logs. There were nothing one unified framework or platform was there which is being replaced by Open Telemetry. And that's the beauty of it. And that is what we call cloud native telemetry. I already mentioned this is the second most active project in CNCF today. Don't need to worry about it. It is going really well in development and things are going on. What are the things you would be able to solve using it? As you know the bifurcation of your request journey from the very upper layer to the all the microservices and again back. So you would able to identify where the time has the most of the time spent by this particular request. And you would be able to have the logs and traces. They are correlated with each other. You would able to see, okay, what is the problem, how to solve it and how to make decisions on it side. So that's the beauty that data will help you. At this moment, since there were platform dependent, vendor dependent solutions are available which makes it cumbersome to solve or integrate multiple platforms, programing languages, and services. Those are the gaps being solved by Open Telemetry. As I mentioned, we would be able to solve those problems how we will go for it. You need to decide the what are the goals, how you will be able to solve it? For that, you need to decide the goals. And you need to work as a whole team to solve the problems that is there. Open your project how that metrics is and other projects could serve. Let's talk about the architecture of it. As I mentioned there are specification the API, SDK, and some of the helpful data is available. The collectors are the one which actually collects the data and send it to the representational tools. There are client libraries which is vendor agnostic for your instrumentation and things like that. Those are all languages and platform are supported at this moment. But you would able to seamlessly emit all these pillars, traces, metrics and logs to the end using any platform. This is the basically your application. We basically delivered one of the agent, I would say a jar in case you are using the Java. And which basically emit the traces which are collected by the Otel Collector. The Otel Collector is a kind of your sidecar, or maybe the agent that is running along with your application which basically sends that data to the upper layer. And if you have multiple such a kind of a programming language are used, multiple microservices are here, and those microservices basically being used to deliver this e-commerce website. And this is the website which is having some of the telemetry or binoscopes selling which I can go and add into cart. I can look into the cart review and I can place the order in a similar way. This is the website which is being served by multiple eservices and microservices. And this is the Jaegar where we can see what is the traces that is happening. Let me expand it for maybe three hours and see what this traces, if I get any, I will see if there is any traces. This is how trace look like okay. The time taken the request originated at this zero microseconds to it actually took this much time. How much time it has taken for this request being serve? That is the representation of it. It represent how much time it actually took and the bifurcation of it. If I go over here, I will see how much time it taken. It took 1.16 milliseconds. The next one took 100 microseconds and likewise. If at all you would able to see where the time has gone, you would able to debug it. There are ways basically show the architecture of it. At this moment it is not really cool. But if you go to here. So it should show me something like this, the correlation of your microservices, how it looks like. That is what it should show. It also show the physical memory how much time it has spent. These are the some of the Grafana dashboard that we build using the Open Telemetry data that is being in this state to it. These are the microservices that is being used. And what is the main rate over the range today. What that particular how many requests per second being served by particular service. So that we can know which service is extremely busy in our application, which needs to be autoscale or needs to be further enhance that you got to know the clarity over here, the latency that is also represented. If it all there are any errors are happening, the error rates and a lot many metrics we can try.