<?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 SignalFx on Medium]]></title>
        <description><![CDATA[Stories by SignalFx on Medium]]></description>
        <link>https://medium.com/@signalfx?source=rss-3ab9c1f45723------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bU4xX1GyA1wAKvrdhwTKVg.png</url>
            <title>Stories by SignalFx on Medium</title>
            <link>https://medium.com/@signalfx?source=rss-3ab9c1f45723------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:22:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@signalfx/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[High-Cardinality Monitoring for Microservices and Containers]]></title>
            <link>https://medium.com/@signalfx/high-cardinality-monitoring-for-microservices-and-containers-8e2e39446211?source=rss-3ab9c1f45723------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e2e39446211</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[SignalFx]]></dc:creator>
            <pubDate>Thu, 01 Nov 2018 17:03:42 GMT</pubDate>
            <atom:updated>2018-11-01T17:03:42.667Z</atom:updated>
            <content:encoded><![CDATA[<p>As organizations of all sizes continue on the journey to cloud-native, the volume of operational data they must deal with has expanded significantly. Metrics from cloud infrastructure, open-source software, and ephemeral application components have not just increased datapoint volume — they have also added to the cardinality of metrics that monitoring systems store and query against.</p><p>In this post, we’ll review the concept of cardinality and explore several aspects of SignalFx that address challenges with handling high cardinality metrics, while keeping our data model rich and flexible.</p><h3>What Does Cardinality Mean in Monitoring Systems?</h3><p>Cardinality in the context of monitoring systems is defined as the number of unique metric time series stored in your monitoring system’s time series database (TSDB). Generally, a metric time series (MTS) is the unique combination of a metric name and any number of key-value pairs known as dimensions or labels. Below is an example of how metrics are represented in SignalFx:</p><p>{2017-08-21_17:32:00} {metric: cpu.utilization} {dimensions [server:sjc001] [service:login]} {value:80}</p><p>Dimensions are useful in monitoring because the additional context they provide enables filtering of time series. To illustrate, imagine if you had three time series measuring cpu utilization:</p><p>{2017-08-21_17:32:00} {metric: cpu.utilization} {dimensions [server:sjc001] [service:login] } {value:80} - <strong>MTS 1</strong><br> {2017-08-21_17:32:00} {metric: cpu.utilization} {dimensions [server:sjc001] [service:logout]} {value:90} - <strong>MTS 2</strong><br> {2017-08-21_17:32:00} {metric: cpu.utilization} {dimensions [server:sjc001] } {value:70} - <strong>MTS 3</strong></p><p>Running an unfiltered query against cpu.utilization without specifying a dimensional key-value pair runs the query against <em>all three time series</em>. However, if you were to filter this query down to service.log*, you would only need to run the query against only <em>two</em> of your time series.</p><p>To further aid grouping and filtering, some systems also allow you to assign tags (occasionally referred to as properties) to dimensions and metrics. Typically, the use of tags and dimensions in metrics-based monitoring systems enables more direct queries to the time series database. They also allow monitoring of dynamic populations and groups of assets (e.g. a group of hosts with a ‘production’ tag). As new hosts are added to the production cluster or removed, the monitoring system will automatically detect changes. Charts and alerts will automatically update based on the population being observed.</p><p>At SignalFx, tagging our AWS EC2 metrics allows us to group our compute instances by the microservice that they back:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/0*Qe172LbfJo_4kl4z.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i3-16QsWsxl-tbwQ.png" /></figure><p>Metrics with dimensions that have many different values are considered high cardinality because each individual combination of metric and dimension value is seen as a unique time series. For example, if you track mean request latency for a service using customer ID as a dimension, and you have 100 customer IDs, your monitoring system has to deal with 100 time series.</p><h3>Why Should You Care?</h3><p>As infrastructure and development practices have evolved, it’s now possible for an organization to have hundreds or thousands of different services, emitting upwards of millions of data points per second. Monitoring practices have also changed — instead of collecting only infrastructure metrics, people are instrumenting their application workflows to measure higher-level indicators of performance. They also monitor according to populations or groups (customers), as opposed to constantly looking at individual components (servers). This use of non-standard tags and dimensions to slice and dice data causes high cardinality.</p><p>What are some use cases that create high cardinality metrics? Below are a few examples.</p><h4>Immutable Infrastructure</h4><p>Your team practices ‘immutable infrastructure’, where infrastructure components are never modified after they’re deployed. As a result, the company’s entire container fleet is replaced for every code push — with new (but equivalent) containers provisioned using a common image that contains the relevant changes. Each new container is represented by a unique time series.</p><h4>Phased Deployments</h4><p>Your team wants to compare different code versions during a canary or blue/green deployment, so that changes can be automatically rolled back if performance is adversely affected.</p><h4>Capacity Planning</h4><p>Your company is trying to forecast infrastructure capacity needs, and requires historical data on resource utilization for each service to see trends over long periods of time.</p><h4>Customer Experience</h4><p>You have a set of APIs that you expose to users, and have to maintain SLAs to specific customers for the uptime and performance of those APIs. To make sure that the company is delivering on its promise, you monitor request rate, errors, and duration for each of your services, and track whether performance varies by user.</p><p>When you perform these kinds of tasks in any monitoring system, your time series footprint steadily grows — and the number of time series that you simultaneously query at any given moment grows as well. One of our customers practices immutable infrastructure as described in the first example, with approximately 1 million containers supporting their production services. This means that for every deployment, <em>1 million new MTS are created in SignalFx.</em></p><h3>What Makes High Cardinality Hard to Manage?</h3><p>High cardinality is hard to manage because it increases both the number of time series that need to be stored by your time series database, and the size of queries that have to be made to it on a regular basis. Queries to the database become more computationally expensive, because there are now more time series, and any significant event (e.g. a code push, burst of user traffic) will result in a flood of simultaneous writes to the database as well.</p><p>The documentation for many monitoring systems actually warns users not to send in dimensions with a high number of potential values, or to keep dimension values below a hard limit to avoid performance penalties.</p><p>For instance, the documentation for <a href="https://prometheus.io/docs/practices/instrumentation/#do-not-overuse-labels">Prometheus</a> cautions against “overusing” labels:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/0*cgk5ytUoijXIBWD3.png" /></figure><p>Datadog also encourages users to use less than 1,000 tag/dimension values per metric, specifically warning that exceeding this limit will incur performance penalties:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/0*ZBdCW9SCUs_xo56F.png" /></figure><p>This problem isn’t unique to metrics-based monitoring systems. <a href="https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-data/collect-custom-metrics">New Relic</a> states that using its APM Agent to collect too many unique MTS will automatically trigger limits on how data appears in its user interface:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/0*HGiO9wO1vw1C2eDm.png" /></figure><p>In all of these cases, a larger time series footprint leads to slower-loading charts, delayed alerts, and less reliable monitoring.</p><h3>SignalFx is Built for High Cardinality Metrics</h3><p><strong>SignalFx allows you to query over 50,000 metric time series in a single job without incurring performance penalties.</strong></p><p>Looking back at the examples above, this means that SignalFx lets you query:</p><ul><li><strong>25x</strong> more metric time series than New Relic</li><li><strong>50x</strong> more metric time series than Datadog</li></ul><p>The solution is designed around a number of features aimed at reducing computational overhead when it comes to fetching data across high cardinality metrics, both in how we perform queries against metric time series and how we store them:</p><h4>Separating Time Series Datapoint Storage from Metadata Storage</h4><p>Because databases tend to be optimized for either storage or retrieval, or around handling a particular type of data, most TSDBs impose limitations on aggregation, cardinality, and querying to preserve stability at the expense of performance.</p><p><strong>SignalFx was designed with two separate backends for storing metric time series — one specifically optimized to handle metric values, and one for human-readable metadata. Each backend is tailored to a specific use case (handling metadata is a search problem, while datapoint storage requires optimizing for bulk reads and writes), and scales independently of the other.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o9-fMRhTlIWJPB2W.png" /></figure><p>Currently, our time series store runs on Cassandra, while metadata in SignalFx is stored in Elasticsearch. We’ve spoken and written on several occasions about the engineering work that we’ve done to make each of these technologies perform in SignalFx, as well as how we scale and operate them on an ongoing basis:</p><h4>Optimizing Query Performance</h4><p>SignalFx does not treat ‘source’ or ‘host’ dimensions as unique. Other TSDBs require the user to specify a primary filter condition on source/host dimensions — any further filtering by tags etc. happens on the result of that primary filter. This makes queries highly inefficient. Since there is no condition on source/host, searching just by a tag requires those systems to scan through all time series to find which ones are a match.</p><p><strong>SignalFx treats all dimensions and tags the same, which means any search by any combination of dimensions is equally efficient and fast. This improves query response times and usability for environments with high cardinality metrics.</strong></p><h3>High Cardinality Metrics in Real-Time, at Any Scale</h3><p><a href="http://info.signalfx.com/metrics-the-foundation-for-cloud-monitoring.html?ori_ref=/high-cardinality-monitoring">High cardinality metrics are becoming increasingly common</a> as people move away from monitoring that purely focuses on system metrics, and towards higher-level indicators of customer experience and application health.</p><p>Using them allows you to make your data more actionable and unlock valuable insights, and SignalFx allows you to easily query over tens of thousands of metric time series. Because of this, we can provide richer charts and more analytics-driven alerting, helping you better understand the behavior of your environment and notifying the right members of your team when issues emerge. In a real-time world, speed and scale make all the difference.</p><p>For in-depth guidance on naming metrics and dimensions in SignalFx, see our <a href="https://docs.signalfx.com/en/latest/best-practices/naming-conventions.html#naming-conventions">documentation on naming conventions</a>. If you’re not using SignalFx yet, get started today with a <a href="https://www.signalfx.com/?signup=true">14-day trial</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wbpTBGkXdie5CKCt.gif" /></figure><p><em>Originally published at </em><a href="https://www.signalfx.com/blog/high-cardinality-monitoring-for-microservices-and-containers/"><em>www.signalfx.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e2e39446211" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In A Digital World Where The Speed of Innovation Matters, Are You Anchored Down by Legacy APM…]]></title>
            <link>https://medium.com/@signalfx/in-a-digital-world-where-the-speed-of-innovation-matters-are-you-anchored-down-by-legacy-apm-bd6178341ee8?source=rss-3ab9c1f45723------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd6178341ee8</guid>
            <category><![CDATA[apm]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[SignalFx]]></dc:creator>
            <pubDate>Thu, 01 Nov 2018 16:38:51 GMT</pubDate>
            <atom:updated>2018-11-01T16:38:51.140Z</atom:updated>
            <content:encoded><![CDATA[<h3>In A Digital World Where The Speed of Innovation Matters, Are You Anchored Down by Legacy APM Agents?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PlS_bSSt4ABU9NtF.png" /></figure><p>This is the second chapter of our multi-part blog series on the deficiencies of traditional APM solutions. For quick reference, our series includes:</p><p>In our<a href="https://www.signalfx.com/blog/in-a-digital-world-where-customer-experience-defines-your-business-is-your-apm-solution-doing-its-job/"> previous blog</a>, we showed how traditional APM solutions fail to provide reliable visibility into application performance because they rely on head-based sampling. The probabilistic and random nature of head-based sampling was good enough for legacy monolithic applications because of their predictable performance patterns. They ran with code in a single unitary system without being subject to frequent changes. While head-based sampling was fine in the monolithic world, it is not suitable for today’s digital environments. In the cloud-native world, it is imperative to follow every transaction, including the long-tail anomalies, for delivering a consistent and flawless end-user experience.</p><h3>Evolution to cloud-native</h3><p>While it’s generally understood that cloud, containers, and serverless, as well as DevOps practices, are the main enablers of microservices, there hasn’t been much talk about how application instrumentation has to evolve to support the new requirements of speed and scale in the cloud-native world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-SNgK8KAGqwwx_Wm.png" /></figure><p>The value proposition of traditional APM was to simplify data collection via bytecode instrumentation using vendor-specific agents. Like head-based sampling, legacy APM agents worked well for monolithic apps, but are becoming increasingly irrelevant and, in many cases, inadequate for the cloud-native world.</p><p>Our conversations with customers and prospects have revealed a clear pattern of shortcomings of the traditional instrumentation approach. Next, we lay out the critical capabilities missing from the current APM solutions to become microservices ready.</p><h3>Traditional APM agents are not based on standards</h3><p>When legacy APM agents were created, there were no industry standards on instrumentation to enable distributed application visibility. Each vendor created proprietary agents resulting in vendor lock-in.</p><p>Today, open-source implementations such as Zipkin and standards such as OpenTracing and OpenCensus have emerged to address visibility into distributed systems in a vendor-neutral way. Open standards enable flexibility and choice by keeping the code instrumentation portable and interoperable, thereby de-risking your investments.</p><p>OpenTracing is an instrumentation standard for application developers and OSS library maintainers to instrument code without locking into any tracing vendor. OpenTracing, in particular, is gaining traction under the governance of <a href="https://www.cncf.io/">Cloud Native Computing Foundation</a> (CNCF).</p><p>Open standards enable you to leverage the innovation from the broader community without getting tied to a particular vendor. For instance, traditional APM vendors typically take weeks or months catching up to the newer versions of OSS frameworks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-9hs4Ckd7XAd7sBk.png" /></figure><p><em>Fig 2: A subset of OSS libraries and framework with out-of-the-box instrumentation in every layer using OpenTracing or Zipkin</em></p><p>Most of the popular frameworks come <a href="https://github.com/opentracing-contrib/">instrumented</a> out-of-the-box by the community or service owners. That means you don’t have to wait for APM vendors to catch up to the newer versions.</p><h3>Bytecode instrumentation is rapidly becoming irrelevant</h3><p>As applications have evolved from monoliths to microservices and serverless functions, bytecode instrumentation is often no longer needed or cannot be even used, for example:</p><ul><li>Languages such as Golang compile directly to machine code rendering bytecode manipulation irrelevant.</li><li>In serverless environments such as AWS Lambda, Microsoft Azure Functions, and Google Cloud Functions, you do not have access to the runtime so the agent-based instrumentation cannot be used.</li><li>Most popular open source frameworks and libraries such as Spring Boot, Kafka, and Cassandra are instrumented out-of-the-box.</li><li>System-wide observability solutions such as service mesh minimize the need for developers to instrument their code. Service mesh observes every microservice interaction via sidecar proxies.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hMhrTHDAqOWuwyYm.png" /></figure><p>The proxy creates trace IDs and propagates the trace throughout the entire distributed system across service boundaries. Service mesh can, therefore, create distributed traces with minimal instrumentation — or the need for heavyweight APM agent.</p><h3>Legacy APM agents are a misfit for containerized environments</h3><p>Modifying the instruction set for every single method via bytecode manipulation can result in significant overhead — so much so that APM vendors implement <a href="https://docs.newrelic.com/docs/agents/java-agent/custom-instrumentation/circuit-breaker-java-custom-instrumentation">circuit breakers</a> to limit the instrumentation.</p><p>This approach worked for applications where a monolith was deployed on a unitary system using bulky J2EE application servers — and where a 2–3% APM agent overhead and few hundred millisecond latency spikes went unnoticed. The infrastructure was static. VMs and bare-metal servers used to run for months.</p><p>In today’s cloud-native environments, enterprises are running microservices on tens and sometimes hundreds of containers on a host. Every millisecond counts when it comes to delivering a flawless end-user experience. The heavyweight agent-based approach doesn’t work in ephemeral and dynamic container environments.</p><p>Traditional APM agents <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/introduction-new-relic-apm#more-features">take a few minutes</a> to initialize and send data to APM SaaS services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I67Qa3UMjbwUBu3R.png" /></figure><p>This will result in minutes of unpredictable blind spots every time a container restarts.</p><p>According to Gartner, Inc. –</p><blockquote><em>“</em>Microservice-based applications are highly complex and dynamic, and they generate large volumes of data. This renders traditional monitoring approaches inadequate at best and dangerously oblivious at worst.</blockquote><blockquote>Traditional APM tooling methods, such as bytecode instrumentation, have several issues:</blockquote><ul><li><em>Significant agent overhead at runtime and heavy-lifting efforts at deployment time.</em></li><li><em>They are unsuitable in the increasingly common polyglot approach of using whatever language is best-suited to the service because many of these languages don’t support bytecode.”</em></li></ul><h3>Proprietary APM agents inhibit DevOps practices</h3><p>In the pre cloud-native world, development and operations were siloed practices where developers dealt with software and operations dealt with hardware. In the cloud-native world, where hardware is in the cloud, development and operations are intertwined and share the responsibility to run applications reliably.</p><p>The traditional agent-based approach leaves developers in the dark as their code gets manipulated at runtime using a proprietary agent. Developers lose the visibility into what code exactly is getting executed in the production environment.</p><p>The open-standards approach provides transparency, better collaboration, and accurately captures developers’ instrumentation intent. In the modern, cloud-native world, SREs and development teams collaborate for observability. Traditional APM’s throw-it-over-the-wall approach simply does not work in the cloud-native world.</p><h3>Next generation APM needs to be based on open and flexible instrumentation</h3><p>In the cloud-native world, data collection has been commoditized. It comes out-of-the-box by leveraging technologies such as service mesh, and is standardized by open, vendor-agnostic specifications. The value of APM has been shifted to analytics.</p><p>According to Gartner, Inc.</p><blockquote>“Instrumentation is not the key value of an APM solution. It is time for instrumentation to reach a further degree of commoditization so that enterprises can prevent agent duplication and overlap due to the tight coupling between an agent and a specific APM solution”</blockquote><p>For APM to get microservices-ready, it needs to supplement the bytecode instrumentation approach with modern, and vendor-neutral system-wide observability approaches.</p><p><a href="https://www.signalfx.com/aws-reinvent-2018/">LEARN MORE</a></p><p>At AWS re:Invent, SignalFx will be showcasing exciting innovations that provide our customers with a flexible and vendor-agnostic approach to instrumentation.</p><p>Be sure to stop by SignalFx booth and attend the following sessions at AWS re:Invent to learn more:</p><p><strong>Nike’s Direct-to-Consumer Transformation</strong></p><p>Nike recognized the need to accelerate its digital transformation, spur growth, and deepen its connection to consumers by individually tailoring content. In this session, learn how Nike adopted a proactive monitoring and observability culture to empower its engineering, SRE, and business teams to keep everything running smoothly at scale.</p><p><a href="https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=89223">Reserve Your Seat</a></p><p><strong>Fully Realizing the Microservices Vision with Service Mesh</strong></p><p>The service mesh is becoming the most critical component of the cloud-native stack. While still early in terms of adoption, this new infrastructure layer has massive implications for the way companies build and operate distributed systems.</p><p><a href="https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=89222">Reserve Your Seat</a></p><p><em>Originally published at </em><a href="https://www.signalfx.com/blog/in-a-digital-world-where-the-speed-of-innovation-matters-are-you-anchored-down-by-legacy-apm-agents/"><em>www.signalfx.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd6178341ee8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In A Digital World Where Customer Experience Defines Your Business, Is Your APM Solution Doing Its…]]></title>
            <link>https://medium.com/@signalfx/in-a-digital-world-where-customer-experience-defines-your-business-is-your-apm-solution-doing-its-620c2b4b6bab?source=rss-3ab9c1f45723------2</link>
            <guid isPermaLink="false">https://medium.com/p/620c2b4b6bab</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[SignalFx]]></dc:creator>
            <pubDate>Thu, 25 Oct 2018 22:31:18 GMT</pubDate>
            <atom:updated>2018-10-25T22:33:00.533Z</atom:updated>
            <content:encoded><![CDATA[<h3>In A Digital World Where Customer Experience Defines Your Business, Is Your APM Solution Doing Its Job?</h3><p>This may seem like a strange question to open a technical blog on Application Performance Management (APM), but it’s not. With customer experience today largely driven by software, we think there’s no more important question to ask.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YCj_niRLngZ9gitm.jpg" /></figure><p>First, let’s be clear what “doing its job” actually means: Measuring application performance. Detecting true anomalies. Monitoring in real-time. Helping you build better web services and software.</p><p>Now that we have that settled, let’s dig into the details.</p><p>It’s no secret that companies today are using microservices, containers, and serverless functions in order to build new applications more efficiently. Breaking the monolith into smaller independent services makes it easier for individual dev teams to be more responsive to the needs of the business and release software more frequently. With customer expectations for reliable, accurate experiences at an all-time high, companies need to move faster and faster while always improving quality and security.</p><p>What does it mean to build better software — and how do we measure “better” it in a world where applications are made up of hundreds of services running in the cloud? What metrics should we be using?</p><p>Low-level metrics like CPU or memory utilization are good for tracking the health of individual software components, but on their own, they don’t help you understand how well microservices are supporting the business. Custom metrics are needed, metrics that are specific to your business.</p><p>Here is a concrete example. A large CPG company runs fire sales of limited product editions through multiple mobile apps and online stores. These campaigns last for three minutes and move extremely large volumes of product. To monitor the effectiveness of the customer experience, the DevOps team tracks standard infrastructure metrics at one-second resolution. This gives them faster alerts while measuring a number of higher-level KPI’s, such as products sold per second, number of credit card transactions per second, number of shipping options provided per second, and the number of orders being sent to fulfillment.</p><p>The need for real-time problem detection has already pushed many organizations to begin using a metrics platform — instead of traditional APM solutions — for visualization, alerting and analytics of application data. Metrics are great for problem detection, but you also need a troubleshooting tool for problem resolution. Our work with hundreds of customers has shown that the shift to microservices has created critical shortfalls in troubleshooting use cases with traditional APM solutions.</p><p>Here are the most frequently cited reasons for why traditional APM is a misfit for monitoring microservices:</p><ol><li>Traditional APM routinely misses trace data when troubleshooting edge cases and intermittent issues.</li><li>Traditional APM has a heavy-weight agent approach that doesn’t scale in containerized environments and doesn’t leverage modern system-wide observability sources such as service mesh.</li><li>Traditional APM does not account for service dependencies leading to alert storms caused by the cascading nature of failures.</li><li>Traditional APM lacks prescriptive triage and root-cause analysis. This leads to finding the needle-in-the-haystack scenarios and higher MTTR.</li></ol><p>Diving deeper, let’s look at how the upfront, data-sampling strategies of traditional APM result in blind spots. Consider this sample scenario:</p><p>You get an urgent alert on a priority-one ticket about a group of users who are experiencing unacceptable latency. What do you do?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*yP4Vw7nd_PwLFDgP.png" /></figure><p>You have APM! You’re confident you’ll be able to isolate the root cause within minutes. You type in customer-id to see the trace and find out which service is causing the latency but… you get a blank screen! No trace found. You end up in war room with a bunch of your colleagues trying to figure out what happened to cause a ton of productivity loss.</p><p>It happens all the time, especially with intermittent issues. There is something different about these user transactions — maybe the payment type, maybe these users are buying a certain item, or maybe they’re hitting canary release. While the vast majority of transactions are processing as usual with average latency, p99 transactions are failing the SLOs. Since APM solution takes a probabilistic and random approach, it is not able to tell you why. You’re flying blind.</p><p>To limit production overhead and reduce cost, traditional APM vendors sample the number of transactions they capture for further analysis. Sampling refers to the decision about which trace to capture and retain.</p><p>Sampling approach, referred to as head-based sampling, makes random decisions at the start of the very first transaction and propagates this decision across service boundaries. Head-based sampling is:</p><ul><li>A probabilistic approach, where a given trace is sampled randomly with a certain fixed percentage limit; or</li><li>A rate-limiting approach, where a given number of traces are sampled per unit time</li></ul><p>These approaches worked well in homogeneous, monolithic environments where a given trace would indicate the health status of the unitary system. But they are a misfit for microservices architectures entailing multiple runtimes across different hosts. Since sampling decision is made at the initiation of the transaction, it cannot be changed, even if a performance impact is observed on a downstream host.</p><h3>Performance Variance and Outliers Tell the Most Interesting Stories</h3><p>If you are only capturing service performance on average, you may be missing events that indicate systematic performance anomalies. Consider the following figure showing the average latency of one of the microservices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NWro6gTOc1dcVenY.png" /></figure><p>On the surface, everything looks good. But since you’re not capturing all outlier transactions, you may be missing the indicators pointing to anomalous behavior.</p><p>In the microservices world where a user request is processed by multiple services, it’s important to observe the variability in high-percentile latency, end-to-end along the service chain. Consider the following scenario showing p(99.9) transactions at a very high resolution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*n_IqaOqciAybf_WZ.png" /></figure><p>Even if traditional APM tools can point to outliers (by capturing RED metrics), they would lack the context and additional details to isolate and troubleshoot the root cause. Additionally, higher latency in a backend service doesn’t necessarily mean systematic performance issue. We need to determine whether high latency represents a true anomaly by comparing to historical levels against multiple dimensions across service boundaries.</p><p>Another use case where traditional APM fails is sampling at the service level when the service exposes multiple procedure calls. APM will capture only the high-frequency procedure calls and may miss the low-frequency procedure calls. You’ll be blindsided when triaging and debugging.</p><p>The chief architect at a major consumer technology firm put it this way: “In the age of social media, companies have to deliver flawless end-user experiences consistently. They also have to understand variability and resolve performance issues in near real-time.”</p><p>For monitoring microservices, it’s critical to analyze every single transaction that is flowing through all the microservices.</p><h3>A Better Strategy for the Microservices World: Tail-based Sampling</h3><p>In tail-based sampling, the decision to retain a trace is made at the completion of all transactions instead at the beginning of the first span. It’s really an intelligent selection strategy that can capture interesting anomalous transactions. As Sambasivan et al. <a href="http://www.pdl.cmu.edu/PDL-FTP/SelfStar/CMU-PDL-14-102.pdf">explain </a>, using tail-based sampling, anomalies can be explicitly preserved whereas most of them would be lost due to the randomness of head-based sampling.</p><p>None of the traditional APM vendors support tail-based sampling.</p><p>New Relic Distributed Tracing, for example, takes the <a href="https://docs.newrelic.com/docs/apm/distributed-tracing/getting-started/how-new-relic-distributed-tracing-works#trace-origin-sampling">rate limiting approach</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/0*S64S54WHD6X2kxL5.png" /></figure><p>Further, New Relic assumes that the random sample of data will represent the entire microservices distributed system including transactions that are very different, e.g. p(99) issues:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/0*_17A9x2r-9Q2StPH.png" /></figure><p>Similarly, Datadog APM <a href="https://docs.datadoghq.com/tracing/getting_further/trace_sampling_and_storage/#traces">enforces</a> an arbitrary limit on agents and also on the backend. It will drop trace data when the limit is reached even if you express the intent to record traces using priority sampling flags.</p><p>The figure below shows the trace data collected over the same period of time from a distributed application using head-based and tail-based sampling strategies. The first histogram is missing errors and the trace data while tail-based sampling approach, as shown in the second histogram, captures those anomalies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gIpwS1XWTuvF9i38.png" /></figure><p>As a result of the naive, head-based sampling strategy, you would miss important anomalous transaction data when you need it the most — while troubleshooting end-user issues and optimizing your applications for better performance and user experience. In effect, you are flying blind with traditional APM.</p><h3>Next Up:</h3><p>In the next few days, we’ll detail other shortcomings of the current generation of APM solutions and what changes are required for APM to become microservices-ready.</p><p>Additionally, at <a href="https://www.signalfx.com/aws-reinvent-2018/">AWS re:Invent</a>, SignalFx will be showcasing exciting innovations that will enable our customers to tackle the most complex microservices monitoring challenges.</p><p>Be sure to stop by our booth. We’re in the middle of the expo hall, you can’t miss us! Our team looks forward to engaging with you.</p><h4>Attend the Following Sessions at AWS re:Invent to Learn More</h4><p><strong>Nike’s Direct-to-Consumer Transformation</strong></p><p>Nike recognized the need to accelerate its digital transformation, spur growth, and deepen its connection to consumers by individually tailoring content. In this session, learn how Nike adopted a proactive monitoring and observability culture to empower its engineering, SRE, and business teams to keep everything running smoothly at scale.</p><p><a href="https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=89223">Reserve Your Seat</a></p><p><strong>Fully Realizing the Microservices Vision with Service Mesh</strong></p><p>The service mesh is becoming the most critical component of the cloud-native stack. While still early in terms of adoption, this new infrastructure layer has massive implications for the way companies build and operate distributed systems.</p><p><a href="https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=89222">Reserve Your Seat</a></p><p><em>Originally published at </em><a href="https://www.signalfx.com/blog/in-a-digital-world-where-customer-experience-defines-your-business-is-your-apm-solution-doing-its-job/"><em>www.signalfx.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=620c2b4b6bab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>