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

推荐订阅源

GbyAI
GbyAI
Y
Y Combinator Blog
F
Fortinet All Blogs
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
博客园 - Franky
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
量子位
博客园 - 三生石上(FineUI控件)
I
InfoQ
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
D
Docker
美团技术团队
雷峰网
雷峰网
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
人人都是产品经理
人人都是产品经理

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
Visualizing trends with regression lines
2016-08-11 · via Datadog | The Monitor blog

At Datadog, we believe in collecting data—and lots of it. But sometimes, when it comes time to look at your metrics, less is more. For those times when you care more about how the metric is trending over time and less about its exact value every minute of the day, regression functions can help. Adding to our long list of query functions, Datadog now offers three regression functions to enhance your dashboards.

In linear regression, an algorithm tries to find the line that best represents a set of points. Datadog has two different linear regression functions: trend_line() and robust_trend().

trend_line() uses the most common type of linear regression—ordinary least squares. For most cases, this algorithm works great, but it can be easily influenced by outliers. Just a small number of outlier points can hugely impact the regression. That’s where robust_trend() comes in. Our robust regression implementation uses Huber loss to pay less attention to metric values that are very different from the rest of the series. The picture below shows how the two algorithms produce different results for a series with a handful of extreme values.

The original series is in blue, `trend_line()` is in purple, and `robust_trend()` is in yellow.
Trend line and robust trend line
The original series is in blue, `trend_line()` is in purple, and `robust_trend()` is in yellow.

Highlight the trend

Trend lines may be added to graphs alongside the original metric to help highlight/clarify the trend. Simply click the + button next to an expression in the query editor to access the function menu, and navigate to the Regression section, where you’ll find all three functions discussed in the post. At Datadog, we like adding the trend line as a dashed line like this:

Trend line UI in Datadog

Remove visual clutter

Charts with “group by” queries can sometimes turn into a mess of spaghetti, especially when the series are noisy. The heatmap visualization type can help visualize the distribution of the series, and top lists can help identify specific tags that are at the top or bottom of the pack. Using trend lines gives you another option for cleaning up a chart by flattening out fluctuations in individual timeseries. For example, the pair of charts below show a set of noisy series with and without trend_line() applied.

Flatten noisy series with trend lines

Piecewise regression

Sometimes a series can’t be well represented by a single regression line. Often this is the case when a code or config change results in a sudden change in a metric. For example, in the graph below, the trend line incorrectly hints that the series is trending upward at a constant rate, but piecewise_constant() fits a step function which correctly shows that the metric had a sudden change in value around 14:00, with a steady state before and after.

Trend line versus stepwise line

The number and duration of the segments (i.e. “steps”) returned by piecewise_constant() are determined automatically, based on the characteristics of the metric passed to the function. The value of each segment will always be the average of all the original metric values that fall within the segment’s time range.

As with linear trends, the piecewise constant regression can also be overlaid on top of a metric. At Datadog, we’ve found this function to be a quick and easy way to visualize the overall change in a metric before and after a deploy.

Line it up

Functions for trend lines, robust trends, and piecewise regression are now available through the graph editor for all Datadog users. If you’re new to Datadog and would like to apply our new regression functions to your own metric graphs, you can sign up for a trial account here.