{"id":4364,"date":"2023-03-01T05:35:14","date_gmt":"2023-03-01T05:35:14","guid":{"rendered":"https:\/\/middleware.io\/backend\/?p=4364"},"modified":"2023-05-26T09:41:26","modified_gmt":"2023-05-26T09:41:26","slug":"what-is-opentelemetry","status":"publish","type":"post","link":"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/","title":{"rendered":"What is OpenTelemetry?"},"content":{"rendered":"\n<p>Collecting logs, metrics, and traces used to be a headache\u2014you must reinstrument at each collection stage, and very few tools enabled unfettered collection. <\/p>\n\n\n\n<p>But times have shifted\u2014software and their respective data have become more automation-based than ever, precipitating an increase in frameworks and tools that offer automated<a href=\"https:\/\/middleware.io\/blog\/observability-vs-monitoring\/\" target=\"_blank\" rel=\"noreferrer noopener\"> monitoring and observability<\/a>.&nbsp;<\/p>\n\n\n\n<p>OpenTelemetry is one such framework that automates the capturing and transmission of telemetry data without altering app instrumentation. OpenTelemetry (OTel) unified the standard for service instrumentation and catalyzed the development of various observability tools.&nbsp;<\/p>\n\n\n\n<p>OTel is, therefore, <em><a href=\"https:\/\/middleware.io\/blog\/observability\/\">observability<\/a> made easy<\/em>. It is a leading project of the Cloud Native Computing Foundation (CNCF) after Kubernetes and a successor of two open-source distributed observability frameworks\u2014OpenTracing and OpenCensus.&nbsp;<\/p>\n\n\n\n<p>The history of Open Telemetry is closely tied to the evolution of modern application architecture and the growing need for more comprehensive observability. <\/p>\n\n\n\n<p>In this article, we deep-dive into the architecture of Open Telemetry, how it works, and its many benefits for developers.<\/p>\n\n\n\n<div id=\"accordian\" class=\"table-of-content\">\n<div class=\"toc-heading accordion\" data-toggle=\"collapse\" data-target=\"#toc\">Table of Contents<\/div>\n<div id=\"toc\" class=\"collapse\" data-parent=\"#accordian\">\n<div class=\"toc-list\">&nbsp;<\/div>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-opentelemetry\">What is OpenTelemetry?<\/h2>\n\n\n\n<p>Open Telemetry is an open-source, vendor-neutral, observability framework for collecting telemetry data from applications and their supporting infrastructures to a backend platform to understand their health and performance.<\/p>\n\n\n\n<p>Open Telemetry transforms and standardizes the way telemetry data is collected and transmitted. By instrumenting, collecting, and exporting telemetry data for analysis, OTel enables developers to observe the status of applications and how to debug or troubleshoot them for any issues.&nbsp;<\/p>\n\n\n\n<p>In addition, with its unified form of instrumentation, you do not need to reinstrument code when they switch backend platforms, reducing the boilerplate code required to collect telemetry data.<\/p>\n\n\n\n<p>OTel supports multiple programming languages and platforms, including <a href=\"https:\/\/middleware.io\/blog\/java-performance-monitoring\/\">Java<\/a>, Python, <a href=\"https:\/\/middleware.io\/blog\/golang-monitoring\/\">Go<\/a>, and <a href=\"https:\/\/middleware.io\/blog\/nodejs-performance-monitoring\/\">Node.js<\/a>, making it easy to use with various applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-telemetry-data\">What is telemetry data?<\/h2>\n\n\n\n<p>Telemetry data are the three pillars of observability\u2014logs, traces, and metrics. They are collected at functional points within an application to ensure end-to-end visibility into the software and its dependencies.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"630\" src=\"https:\/\/middleware.io\/backend\/wp-content\/uploads\/2022\/08\/three-pillers-of-observability-1-1024x630.jpg\" alt=\"three pilers of observability\" class=\"wp-image-445\" srcset=\"https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2022\/08\/three-pillers-of-observability-1-1024x630.jpg 1024w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2022\/08\/three-pillers-of-observability-1-300x184.jpg 300w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2022\/08\/three-pillers-of-observability-1-768x472.jpg 768w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2022\/08\/three-pillers-of-observability-1-1536x944.jpg 1536w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2022\/08\/three-pillers-of-observability-1-2048x1259.jpg 2048w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2022\/08\/three-pillers-of-observability-1-1200x738.jpg 1200w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2022\/08\/three-pillers-of-observability-1-1980x1217.jpg 1980w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>It helps in <a href=\"https:\/\/middleware.io\/product\/apm\/\" target=\"_blank\" rel=\"noreferrer noopener\">application performance management<\/a>, ensuring the software functions as expected and provides optimal user experience.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-logs\">1. Logs<\/h3>\n\n\n\n<p>These are event-based records of happenings within an application and <a href=\"https:\/\/middleware.io\/blog\/cloud-infrastructure-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\">cloud infrastructure<\/a>. Logs provide a chronological record of events and actions like user activity, system errors, and application events. Logs are used to troubleshoot issues, identify trends, and monitor system performance.\u00a0<\/p>\n\n\n\n<p>Cloud-based applications typically generate a large volume of logs, which can be challenging to manage and analyze. OTel offers tools that help collect, store, and <a href=\"https:\/\/middleware.io\/blog\/what-is-log-monitoring\/\">analyze logs in real time<\/a>. You can also integrate third-party solutions into the OpenTelemetry framework for log collection, storage, and analysis.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-traces\">2. Traces<\/h3>\n\n\n\n<p>Traces display how an activity progresses within a system, more like throughput. It is a track of events from start to finish. Traces provide detailed information about the performance of a specific transaction or request.&nbsp;<\/p>\n\n\n\n<div class=\"container-cta small\">\n<h3>Get Logs, Traces, and Metrics data in one place.<\/h3>\n    \t<a href=\"https:\/\/app.middleware.io\/auth\/register\/\" target=\"_blank\" rel=\"noopener\"><button class=\"primary white\">See how<\/button><\/a>\n<\/div>\n\n\n\n<p>A trace is a set of related spans that describe the lifecycle of a request. Each span represents a single operation within a trace, such as a function call or a database query. Spans are linked together to form a trace tree that shows the flow of a request through the system.&nbsp;<\/p>\n\n\n\n<p>Traces may include data such as the time to complete the transaction, resources consumed, and any errors. Traces are used to diagnose performance issues and to optimize system resources. It is also used to monitor latency in systems.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-metrics\">3. Metrics<\/h3>\n\n\n\n<p>Metrics are measurable data points aggregated over a while. They are a specific type of telemetry data that provides quantitative measurements of system performance and behavior. For example, metrics may include resource utilization, network traffic, and memory usage.&nbsp;<\/p>\n\n\n\n<p>You can use metrics to monitor various performance KPIs like response time, resource usage, error rate, throughput, and availability. Metrics monitor system performance, identify trends and <a href=\"https:\/\/middleware.io\/blog\/data-driven-approach-engineering\/\">make data-driven decisions<\/a> to optimize system resources and improve their performance, reliability, and user experience.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-does-open-telemetry-work\">How does Open Telemetry work?<\/h2>\n\n\n\n<p>Open Telemetry captures and transmits telemetry data with several components, especially the Application Programming Interfaces (APIs) and the Software Development Kits(SDKs).&nbsp;<\/p>\n\n\n\n<p>The API defines the interface that applications use to generate telemetry data, while the SDKs are responsible for implementing the API and handling the processing and exporting of telemetry data.&nbsp;<\/p>\n\n\n\n<p>The following is how OpenTelemetry works:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-apis\">1. APIs<\/h3>\n\n\n\n<p>OpenTelemetry firstly instruments the application code using APIs. This is to generate telemetry data, instruct the application of metrics to gather and how to gather them, and ensure no code changes occur when switching between different SDK implementations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-sdks\">2. SDKs<\/h3>\n\n\n\n<p>OTel provides libraries and language-specific integrations for developers to instrument their code and capture telemetry data. The OTel&#8217;s SDK is an OpenTelemetry client library for various programming languages like <a href=\"https:\/\/middleware.io\/blog\/java-performance-monitoring\/\">Java<\/a>, <a href=\"https:\/\/middleware.io\/blog\/golang-monitoring\/\" target=\"_blank\" rel=\"noreferrer noopener\">Golang<\/a>, and Python. OTel pools the data from these libraries and transmits it for processing and exporting.&nbsp;<\/p>\n\n\n\n<p>With the aid of OpenTelemetry Protocol (OTLP), OTel sends data from the SDK to the Collector. The OTLP specification defines the encoding of telemetry data and the protocol used to exchange data between the client and the server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-otel-collector\">3. OTel Collector<\/h3>\n\n\n\n<p>The OTel Collector collects telemetry data from SDK or any other source for onward transmission to a supported backend source. It is a central repository for receiving, processing and exporting telemetry data.&nbsp;<\/p>\n\n\n\n<p>OpenTelemetry Collector can serve as a local collector for an application (by which it is deployed as an agent) and a central collector for multiple applications (here, it is deployed as a gateway).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-processing\">4. Processing<\/h3>\n\n\n\n<p>Once the Collector collects the telemetry data with the aid of receivers, its processors then process the data. This comprises sampling, enriching, and aggregating the data, by applying filters and transformations to prepare it for export.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-5-exporters\">5. Exporters<\/h3>\n\n\n\n<p>OTel has a suite of exporters in the Collector that support multiple data formats. The exporters transmit the data to the backend or observability platform that you&#8217;ve chosen, such as Middleware. A developer can configure multiple exporters to send telemetry data to different destinations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-6-observability\">6. Observability<\/h3>\n\n\n\n<p>Once the telemetry data is exported to the chosen backends, it can be visualized and analyzed using observability tools, such as <a href=\"https:\/\/grafana.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Grafana<\/a> for metrics, <a href=\"https:\/\/www.jaegertracing.io\/\">Jaeger<\/a> for traces, <a href=\"https:\/\/www.elastic.co\/kibana\">Kibana<\/a> for logs, or <a href=\"https:\/\/middleware.io\/\">Middleware<\/a> built to analyze all forms of telemetry data. <\/p>\n\n\n\n<div class=\"full-container-cta orange\">\n    <div class=\"d-flex\">\n        <div class=\"img\">\n            <img decoding=\"async\" src=\"\/images\/obse_cta.png\" alt=\"Observe content CTA\">\n        <\/div>\n        <div class=\"content-cta\">\n            <h3>Real-time cloud-native observability platform at scale.<\/h3>\n            <a href=\"https:\/\/app.middleware.io\/auth\/register\/\" target=\"_blank\" rel=\"noopener\"><button class=\"primary white arrow\">Get started<\/button><\/a>\n        <\/div>\n    <\/div>\n<\/div>\n\n\n\n<p>Observability allows you to gain insights into the performance and behavior of your applications and infrastructure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How Middleware collects, processes, and monitors OTel data<\/strong><\/h2>\n\n\n\n<p>Middleware\u2019s agent is an open telemetry collector. The collector receives processes and exports telemetry data to one or more backends. It is designed to be universal, allowing it to work across multiple open-source or commercial systems.<br><br>Middleware agent (Collector) has three components:<\/p>\n\n\n\n<ol><li><strong>Receiver<\/strong><br>The receiver defines how data is gathered: pushing the data to the Collector during regular intervals or pulling it only when queried. If needed, the receiver can collect data from multiple sources.<br><\/li><li><strong>Processor<br><\/strong>The processor performs intermediary operations that prepare the data for exporting, such as batching and adding metadata.<br><\/li><li><strong>Exporter<\/strong><br>The exporter sends the telemetry data to an open-source or commercial backend, depending on what the user has specified. Like the receiver, the exporter can push or pull this data.<\/li><\/ol>\n\n\n\n<p>Once the Middleware agent is installed, it collects the data from Telemetry sources (ex: OTEL\u2019s SDK, shared infrastructure, etc.) and processes the data, and sends it to Middleware Dashboard.<\/p>\n\n\n\n<p>Refer to the following flow chart to understand this process:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"567\" src=\"https:\/\/middleware.io\/backend\/wp-content\/uploads\/2023\/03\/How-Middlewares-Otel-works-1024x567.jpeg\" alt=\"How Middleware's OTel works\" class=\"wp-image-4496\" srcset=\"https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/How-Middlewares-Otel-works-1024x567.jpeg 1024w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/How-Middlewares-Otel-works-300x166.jpeg 300w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/How-Middlewares-Otel-works-768x425.jpeg 768w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/How-Middlewares-Otel-works-1200x665.jpeg 1200w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/How-Middlewares-Otel-works.jpeg 1327w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Once the Middleware agent (OTEL Collector)&nbsp; is installed, you can visualize the data in Middleware\u2019s Unified Dashboard. You can see what\u2019s happening in your infrastructure and application by looking at the data.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/middleware.io\/backend\/wp-content\/uploads\/2023\/03\/Middleware-dashboard-1024x536.jpg\" alt=\"Middleware\u2019s Unified Dashboard\" class=\"wp-image-4498\" srcset=\"https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Middleware-dashboard-1024x536.jpg 1024w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Middleware-dashboard-300x157.jpg 300w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Middleware-dashboard-768x402.jpg 768w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Middleware-dashboard-1536x803.jpg 1536w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Middleware-dashboard-2048x1071.jpg 2048w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Middleware-dashboard-1200x628.jpg 1200w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Middleware-dashboard-1980x1036.jpg 1980w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To look into your application, you can use Middleware\u2019s APM, and to get more detail about any trace, you can click on the trace from the trace list and get all the details of the traces.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"540\" src=\"https:\/\/middleware.io\/backend\/wp-content\/uploads\/2023\/03\/Frame-1000002348-2-1024x540.jpg\" alt=\"Traces List\" class=\"wp-image-4500\" srcset=\"https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002348-2-1024x540.jpg 1024w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002348-2-300x158.jpg 300w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002348-2-768x405.jpg 768w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002348-2-1536x811.jpg 1536w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002348-2-2048x1081.jpg 2048w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002348-2-1200x633.jpg 1200w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002348-2-1980x1045.jpg 1980w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then you can click on each and get more details:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"643\" src=\"https:\/\/middleware.io\/backend\/wp-content\/uploads\/2023\/03\/Frame-1000002353-1-2-1024x643.jpg\" alt=\"Traces List\" class=\"wp-image-4502\" srcset=\"https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002353-1-2-1024x643.jpg 1024w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002353-1-2-300x188.jpg 300w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002353-1-2-768x482.jpg 768w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002353-1-2-1536x964.jpg 1536w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002353-1-2-2048x1286.jpg 2048w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002353-1-2-1200x753.jpg 1200w, https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/Frame-1000002353-1-2-1980x1243.jpg 1980w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-are-the-benefits-of-open-telemetry\">What are the benefits of Open Telemetry?<\/h2>\n\n\n\n<p>OpenTelemetry is valuable to any observability stack a developer will amass, from its simplicity to flexibility and sophisticated features. The following are some of the critical benefits of OpenTelemetry:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-vendor-agnostic\">1. Vendor-agnostic<\/h3>\n\n\n\n<p>OTel can work with any native or third-party vendor. This makes it highly flexible and scalable. And even in the face of innovation, OpenTelemetry is built for emerging compatibility.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-consistent-instrumentation\">2. Consistent instrumentation<\/h3>\n\n\n\n<p>The trend is that if you switch to a different framework, you must expend time and resources installing different proprietary agents or reinstrumenting your code.&nbsp;<\/p>\n\n\n\n<p>With OTel, you do not have to alter or expend anything. OTel enables you to easily instrument your application and collect data on performance, errors, and other metrics data. This allows you to quickly compare data across different services, which is vital in a distributed system.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-increased-visibility\">3. Increased visibility<\/h3>\n\n\n\n<p>OTel provides a unified view of your application&#8217;s performance and behavior, enabling you to easily monitor and troubleshoot your applications. This visibility eases the detection and diagnosis of issues in real-time, reducing downtime and improving the overall performance of your applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-interoperability\">4. Interoperability<\/h3>\n\n\n\n<p>Various systems built with different programming languages can use OTel&#8217;s standard instrumentation across all services to exchange information. With this feature, OpenTelemetry bridges the gap of visibility, which is a giant step to reduce the complexity required in pre-existing observability frameworks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-service-instrumentation-the-basic-concepts\">Service instrumentation: The basic concepts<\/h2>\n\n\n\n<p>Observability is an investigation to comprehensively understand an application&#8217;s performance and health Instrumentation is the first step to observability. <\/p>\n\n\n\n<div class=\"container-cta\">\n    <img decoding=\"async\" src=\"\/images\/container-cta.png\" alt=\"Small content CTA\">\n    <h3>Ditch manual instrumentation and say hello to automated instrumentation.<\/h3>\n    <a href=\"https:\/\/app.middleware.io\/auth\/register\/\" target=\"_blank\" rel=\"noopener\"><button class=\"primary white\">See how Middleware works<\/button><\/a>\n<\/div>\n\n\n\n<p>In addition, instrumentation primes the codebase for the collection of telemetry data. Service instrumentation is, therefore, crucial and foundational to real-time observability.&nbsp;<\/p>\n\n\n\n<p>There are two main approaches to service instrumentation\u2014automatic and manual instrumentation. Both have advantages and disadvantages, and the choice of approach depends on the requirements of the application and the resources available for instrumentation.&nbsp;<\/p>\n\n\n\n<p>Some applications even require a combination of manual and automatic instrumentation to achieve the desired instrumentation level.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-manual-instrumentation\"><strong>Manual instrumentation<\/strong><\/h3>\n\n\n\n<p>Manual instrumentation involves adding instrumentation code to the application codebase manually. You, as a developer, can do this during development. System administrators can also do it after deployment.&nbsp;<\/p>\n\n\n\n<p>This instrumentation involves modifying code in specific locations to capture metrics, logs, or traces. Manual instrumentation can be time-consuming and error-prone, but it allows for fine-grained control over what data is captured and how it is collected.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-pros\"><strong>Pros<\/strong><\/h4>\n\n\n\n<ol><li><strong>Increased control:<\/strong> With manual instrumentation, you have more control over what data is collected and how it is collected, leading to more relevant and accurate data.<\/li><\/ol>\n\n\n\n<ol start=\"2\"><li><strong>Targeted monitoring:<\/strong> Manual instrumentation allows you to target specific areas of the codebase for monitoring, which can help identify and address specific issues.<\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-cons\"><strong>Cons<\/strong><\/h4>\n\n\n\n<ol><li><strong>Time-consuming:<\/strong> Manual instrumentation requires you to manually add monitoring and logging to the codebase, which can be time-consuming.<\/li><\/ol>\n\n\n\n<ol start=\"2\"><li><strong>Potential for errors:<\/strong> Manual instrumentation can introduce errors into the codebase if not implemented correctly, affecting service behavior.<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-automatic-instrumentation\"><strong>Automatic instrumentation<\/strong><\/h3>\n\n\n\n<p>Automatic instrumentation involves using specialized tools or libraries to automatically add instrumentation code to the codebase. You can do this during build or deployment.&nbsp;<\/p>\n\n\n\n<p>This instrumentation significantly reduces the manual effort required to instrument an application and helps ensure consistent instrumentation across different application components.&nbsp;<\/p>\n\n\n\n<p>However, automatic instrumentation is relatively less flexible and may not capture all relevant data.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-pros-1\"><strong>Pros<\/strong><\/h4>\n\n\n\n<ol><li><strong>Easy to use:<\/strong> Automatic instrumentation requires minimal effort since instrumentation is automatically added to the code at runtime or compile time.<\/li><\/ol>\n\n\n\n<ol start=\"2\"><li><strong>Real-time monitoring:<\/strong> Since automatic instrumentation is usually implemented at runtime, it enables real-time monitoring, allowing for quick identification and resolution of issues.<\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-cons-1\"><strong>Cons<\/strong><\/h4>\n\n\n\n<ol><li><strong>Lack of control:<\/strong> You have less control over what data is collected and how it is collected, which can hamper the relevance and accuracy of collected data.&nbsp;<\/li><\/ol>\n\n\n\n<ol start=\"2\"><li><strong>Limited customization:<\/strong> You can not customize how collected data will be stored in the codebase. This limits how much you can customize during metric analysis.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-open-telemetry-use-cases\">Open Telemetry use cases<\/h2>\n\n\n\n<p>Working with OpenTelemetry exposes you to boundless observability and monitoring scenarios. Some scenarios in which OTel is useful are:&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-tracking-performance-metrics-of-distributed-microservices-clusters\"><strong>1. Tracking performance metrics of distributed microservices\/clusters&nbsp;<\/strong><\/h3>\n\n\n\n<p>In a <a href=\"https:\/\/middleware.io\/blog\/microservices-architecture\/\">microservices architecture<\/a>, applications are segmented into multiple clusters called microservices. Monitoring the performance of each microservice can be challenging, especially when dealing with large and complex systems.&nbsp;<\/p>\n\n\n\n<p>OpenTelemetry enables you to unify the instrumentation of all your microservices through the APIS and collect performance data from each.&nbsp;<\/p>\n\n\n\n<p>For example, suppose you are developing a non-monolithic e-commerce platform with a product catalog, checkout, and payment clustered in buckets.&nbsp;<\/p>\n\n\n\n<p>In that case, you can monitor the performance of all these components by implementing OTel. You can then visualize these metrics in a dashboard to quickly identify bottlenecks and troubleshoot issues.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-continuous-monitoring-of-cloud-native-infrastructure\"><strong>2. Continuous monitoring of cloud-native infrastructure<\/strong><\/h3>\n\n\n\n<p>OTel standardizes the instrumentation and collection of data when monitoring your servers, <a href=\"https:\/\/middleware.io\/blog\/containerization\/\">containers<\/a>, and databases. For example, suppose your cloud-native infra is running on a platform like <a href=\"https:\/\/middleware.io\/blog\/proven-practices-to-reduce-aws-cost\/\">AWS<\/a> or Azure.&nbsp;<\/p>\n\n\n\n<p>In that case, you can instrument each application component with OpenTelemetry and collect performance metrics such as CPU utilization, memory usage, and disk I\/O. You can then use this data to continuously monitor your application&#8217;s health and performance. If any metrics fall outside predefined thresholds, you will receive alerts and take action to prevent downtime.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>OpenTelemetry is a powerful open-source project that has revolutionized observability in modern software systems. Its components, including the SDKs, exporters, and collectors, provide a unified approach to collecting, processing, and exporting telemetry data from various sources consistently and efficiently.<\/p>\n\n\n\n<p>By leveraging OpenTelemetry, developers can gain insight into the performance and behavior of their applications, identify bottlenecks and issues, and improve overall system reliability and user experience. OTel\u2019s vendor-neutral nature enables its integration with third-party monitoring tools like Middleware.&nbsp;<\/p>\n\n\n\n<p>In addition to telemetry data collection, Middleware offers analytical and dashboard customization features, allowing for more flexibility and coverage. Middleware also has an add-on feature that enables you to create custom dashboards for visualizing collected telemetry data, allowing for more flexibility than usual. <\/p>\n\n\n\n<p>Additionally, Middleware stores telemetry data in S3 instead of traditional warehouses or systems. <a href=\"https:\/\/app.middleware.io\/auth\/register\/\">Start collecting OTel data for free today!<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide aims to explain OpenTelemetry (OTel) from ground up, how it works, why it&#8217;s still important in 2023 and it&#8217;s potential use cases.<\/p>\n","protected":false},"author":3,"featured_media":4505,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[487],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What Is OpenTelemetry? Why it&#039;s important &amp; How to use it in 2023<\/title>\n<meta name=\"description\" content=\"OpenTelemetry is an open-source, vendor-neutral, observability framework for collecting telemetry data. Know more about OTel here:\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What Is OpenTelemetry? Why it&#039;s important &amp; How to use it in 2023\" \/>\n<meta property=\"og:description\" content=\"OpenTelemetry is an open-source, vendor-neutral, observability framework for collecting telemetry data. Know more about OTel here:\" \/>\n<meta property=\"og:url\" content=\"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/\" \/>\n<meta property=\"og:site_name\" content=\"Middleware\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-01T05:35:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-26T09:41:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/How-Middleware-collects-processes-and-monitors-OTel-data-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1300\" \/>\n\t<meta property=\"og:image:height\" content=\"700\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Keval Bhogayata\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Keval Bhogayata\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/\",\"url\":\"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/\",\"name\":\"What Is OpenTelemetry? Why it's important & How to use it in 2023\",\"isPartOf\":{\"@id\":\"https:\/\/stage-site.middleware.io\/es\/#website\"},\"datePublished\":\"2023-03-01T05:35:14+00:00\",\"dateModified\":\"2023-05-26T09:41:26+00:00\",\"author\":{\"@id\":\"https:\/\/stage-site.middleware.io\/es\/#\/schema\/person\/1a62947464480ee9d43e9d23273aee85\"},\"description\":\"OpenTelemetry is an open-source, vendor-neutral, observability framework for collecting telemetry data. Know more about OTel here:\",\"breadcrumb\":{\"@id\":\"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/#breadcrumb\"},\"inLanguage\":\"es-ES\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/stage-site.middleware.io\/es\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Conocimientos\",\"item\":\"https:\/\/stage-site.middleware.io\/es\/category\/conocimientos\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What is OpenTelemetry?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/stage-site.middleware.io\/es\/#website\",\"url\":\"https:\/\/stage-site.middleware.io\/es\/\",\"name\":\"Middleware\",\"description\":\"Observability platform\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/stage-site.middleware.io\/es\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"es-ES\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/stage-site.middleware.io\/es\/#\/schema\/person\/1a62947464480ee9d43e9d23273aee85\",\"name\":\"Keval Bhogayata\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es-ES\",\"@id\":\"https:\/\/stage-site.middleware.io\/es\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cd6dc5af193f0da3565c9333dfba8f6d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cd6dc5af193f0da3565c9333dfba8f6d?s=96&d=mm&r=g\",\"caption\":\"Keval Bhogayata\"},\"description\":\"Keval is a tech enthusiast and DevOps professional who likes contributing to open-source projects. These days, he is focused on working with projects around Observability and sharing about the same with his articles.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/bhogayatakb\/\"],\"url\":\"https:\/\/stage-site.middleware.io\/es\/author\/keval\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What Is OpenTelemetry? Why it's important & How to use it in 2023","description":"OpenTelemetry is an open-source, vendor-neutral, observability framework for collecting telemetry data. Know more about OTel here:","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"es_ES","og_type":"article","og_title":"What Is OpenTelemetry? Why it's important & How to use it in 2023","og_description":"OpenTelemetry is an open-source, vendor-neutral, observability framework for collecting telemetry data. Know more about OTel here:","og_url":"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/","og_site_name":"Middleware","article_published_time":"2023-03-01T05:35:14+00:00","article_modified_time":"2023-05-26T09:41:26+00:00","og_image":[{"width":1300,"height":700,"url":"https:\/\/stage-site.middleware.io\/wp-content\/uploads\/2023\/03\/How-Middleware-collects-processes-and-monitors-OTel-data-1.jpg","type":"image\/jpeg"}],"author":"Keval Bhogayata","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Keval Bhogayata","Tiempo de lectura":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/","url":"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/","name":"What Is OpenTelemetry? Why it's important & How to use it in 2023","isPartOf":{"@id":"https:\/\/stage-site.middleware.io\/es\/#website"},"datePublished":"2023-03-01T05:35:14+00:00","dateModified":"2023-05-26T09:41:26+00:00","author":{"@id":"https:\/\/stage-site.middleware.io\/es\/#\/schema\/person\/1a62947464480ee9d43e9d23273aee85"},"description":"OpenTelemetry is an open-source, vendor-neutral, observability framework for collecting telemetry data. Know more about OTel here:","breadcrumb":{"@id":"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/#breadcrumb"},"inLanguage":"es-ES","potentialAction":[{"@type":"ReadAction","target":["https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/stage-site.middleware.io\/es\/what-is-opentelemetry\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/stage-site.middleware.io\/es\/"},{"@type":"ListItem","position":2,"name":"Conocimientos","item":"https:\/\/stage-site.middleware.io\/es\/category\/conocimientos\/"},{"@type":"ListItem","position":3,"name":"What is OpenTelemetry?"}]},{"@type":"WebSite","@id":"https:\/\/stage-site.middleware.io\/es\/#website","url":"https:\/\/stage-site.middleware.io\/es\/","name":"Middleware","description":"Observability platform","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/stage-site.middleware.io\/es\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"es-ES"},{"@type":"Person","@id":"https:\/\/stage-site.middleware.io\/es\/#\/schema\/person\/1a62947464480ee9d43e9d23273aee85","name":"Keval Bhogayata","image":{"@type":"ImageObject","inLanguage":"es-ES","@id":"https:\/\/stage-site.middleware.io\/es\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cd6dc5af193f0da3565c9333dfba8f6d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cd6dc5af193f0da3565c9333dfba8f6d?s=96&d=mm&r=g","caption":"Keval Bhogayata"},"description":"Keval is a tech enthusiast and DevOps professional who likes contributing to open-source projects. These days, he is focused on working with projects around Observability and sharing about the same with his articles.","sameAs":["https:\/\/www.linkedin.com\/in\/bhogayatakb\/"],"url":"https:\/\/stage-site.middleware.io\/es\/author\/keval\/"}]}},"_links":{"self":[{"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/posts\/4364"}],"collection":[{"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/comments?post=4364"}],"version-history":[{"count":12,"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/posts\/4364\/revisions"}],"predecessor-version":[{"id":5209,"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/posts\/4364\/revisions\/5209"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/media\/4505"}],"wp:attachment":[{"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/media?parent=4364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/categories?post=4364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stage-site.middleware.io\/es\/wp-json\/wp\/v2\/tags?post=4364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}