惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Help Net Security
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
Netflix TechBlog - Medium
S
SegmentFault 最新的问题
The Cloudflare Blog
I
InfoQ
美团技术团队
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
L
LangChain Blog
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis
Auto-smooth noisy metrics to reveal trends
Yassine Benazzou · 2018-08-28 · via Datadog | The Monitor blog
Yassine Benazzou

Yassine Benazzou

Datadog makes it easy to correlate, compare, and visualize metrics from your infrastructure and applications. Some metrics, however, are inherently so noisy that the graphs become unreadable (the dreaded spaghettification problem), and you lose the ability to extract essential information about trends and large-scale deviations. For cases like these, we provide several smoothing functions that help you identify trends in your metrics. But choosing a smoother that works well for all zoom levels and points in time can be difficult to impossible. That’s why we created an Auto Smoother that automatically removes the noise of a timeseries while preserving its shape.

Let’s explore a few examples that show how Auto Smoother can help you derive more insights from your graphs.

Datadog’s new Auto Smoother function reduces the noise in infrastructure and application metrics.

Both of the graphs above show the same metric—the CPU idle on one of our production clusters—before (left) and after (right) applying Auto Smoother. This metric frequently oscillates between very high and very low values, making it hard to see trends in CPU usage until we apply the Auto Smoother. In both graphs, we can see that a couple of nodes became idle around 11:20 a.m. But only the smoothed graph makes it clear that, after this occurred, the remaining nodes almost halved their idle time as a result.

Auto Smoother also helps us identify trends in metrics that exhibit seasonality. Both of the graphs below show the average system load for each node in an application. This metric exhibits cyclical behavior, with peaks occurring about every 20 minutes.

The Auto Smoother function enables you to see differences in timeseries that would otherwise be hidden by noise.

In the graph on the left, we can see that two hosts regularly exhibit peaks that rise above the spaghetti, but it’s difficult to assess exactly how much more load those hosts have compared to others. It’s also hard to determine if there are any irregularities in this cyclical behavior. Using Auto Smoother makes it immediately obvious that two of the boxes have about twice as much load as their peers. Auto Smoother also helps spot irregularities in the load. For example, we can see that the second-most loaded host (in yellow) exhibited a noticeable decrease of load around 12:00.

Auto Smoother under the hood

Our Auto Smoother is inspired by the ASAP (Automatic Smoothing for Attention Prioritization) algorithm developed by Stanford’s Future Data Systems Research Group. Like ASAP, our algorithm uses a moving average to smooth the timeseries, automatically choosing the optimal size for the moving average window based on two properties of the smoothed timeseries: the roughness and the kurtosis (defined below). The window size refers to the number of datapoints that will be used to calculate the moving average—in other words, a larger window size will lead to more smoothing.

The roughness is a measure of the noisiness of a timeseries. It is defined as the standard deviation of the first difference series. The kurtosis is the fourth standardized moment of a random variable. It measures the “tailedness” or “outlyingness” of the probability distribution of the timeseries: a metric with larger tails in its probability distribution will have a higher kurtosis. Auto Smoother uses this measure to ensure that the smoothed series preserves the large-scale trend of the original noisy timeseries. In other words, it prevents the algorithm from oversmoothing.

Combined, these two measures define an objective function that our Auto Smoother algorithm uses to calculate the optimal window size for the moving average. The window size is chosen so that the moving average will reduce the noise, or roughness measure, while ensuring that the kurtosis of the smoothed data remains high enough for the user to spot important deviations and trends in the timeseries.

An algorithm purpose-built for high-scale monitoring

To specifically account for the level of fluctuations present in timeseries collected from high-scale infrastructure and applications, our Auto Smoother algorithm weighs roughness and kurtosis differently than ASAP does. Our algorithm also uses a different optimization technique, which allows us to continuously smooth metrics and yield faster results for the data displayed on our real-time dashboards.

Advantages of Auto Smoother

Compared to other traditional smoothing functions, Datadog’s Auto Smoother has several advantages:

  • It automatically chooses the optimal window size to smooth your timeseries, which means that you don’t need to try several parameters before finding the one that best fits your timeseries. For example, the following timeseries exhibit some seasonality. Auto Smoother detects that periodic behavior and uses it to calculate the ideal window size parameter for smoothing:

The Auto Smoother function reduces the noise from periodic trends and dips.
  • Auto Smoother continuously adapts the smoothing window based on the noisiness of new datapoints as they are collected in real time. (If newly collected points make the timeseries too noisy, Auto Smoother will change the smoothing window accordingly.)

  • When you change the time range of a dashboard, Auto Smoother automatically adapts and chooses a new best window size. At different levels of zoom, the optimal window size can vary greatly (e.g., a zoomed-in plot often needs much more smoothing than a zoomed-out graph of the same timeseries).

  • When you apply Auto Smoother to several timeseries using a group by query (e.g., avg by), the same window size is applied on all the timeseries, providing consistent smoothing for easy comparison and visual inspection across hosts or other infrastructure components:

The Auto Smoother function reveals clear trends in metrics.

Our Auto Smoother can also be combined with other algorithms, like outlier detection, to help highlight important abnormalities in your metrics.

Using Auto Smoother with outlier detection automatically reveals timeseries that are diverging.

In this example, we have applied an outlier detection algorithm to the same CPU idle metric discussed in the first example above. Noise obscures outliers in the graph on the left, whereas in the graph on the right, Auto Smoother makes it obvious that two hosts (highlighted in blue and purple) are behaving significantly differently than their peers, as identified by the outlier detection algorithm.

Take Auto Smoother for a drive

To use Auto Smoother, simply click the + button next to an expression in the timeseries graph query editor to access the function menu. Then navigate to the “Smoothing” section, where you’ll find the Auto Smoother function (autosmooth()):

Adding Auto Smoother to a timeseries graph in the Datadog UI.

Auto Smoother is now available in Datadog, so you can immediately start using it to reduce the noise in your timeseries visualizations. If you’re new to Datadog and you’d like to use this algorithm to extract valuable signals from noisy timeseries data, you can get started with a 14-day free trial.