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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
爱范儿
爱范儿
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
S
SegmentFault 最新的问题
博客园 - Franky
博客园_首页
T
Tailwind CSS 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
Use formulas and functions in RUM monitors for high-value...
Jamie Milstein, David Lentz · 2022-04-22 · via Datadog | The Monitor blog
Jamie Milstein

Jamie Milstein

David Lentz

David Lentz

Real User Monitoring (RUM) gives you visibility into the behavior of your users and the performance of your applications. You may already be using RUM monitors to automatically notify your team when the number of RUM events—such as pageviews, clicks, or errors—rises above a threshold you define. Now you can use formulas and functions to create RUM monitors that alert on, for example, deviations in user behaviors such as spending patterns, as well as application performance indicators like rising error rates.

In this post, we’ll show you how you can use formulas and functions in your RUM monitoring to alert on ratios and percentages of user activity as well as comparisons between time periods. First, we’ll take a closer look at how formulas and functions work and how you can use them in your RUM monitors.

A screenshot shows a RUM monitor that tracks page load time.
A screenshot shows a RUM monitor that tracks page load time.

Create actionable RUM monitors with formulas and functions

RUM monitors compare a value with a threshold you define, such as a web page’s largest contentful paint (view.largest_contentful_paint) at a threshold of 2.5 seconds. But in many cases, comparing a single RUM datapoint with your threshold can’t fully describe your users’ experience or your application’s performance.

By building RUM monitors that leverage formulas and functions, you can create alerts that trigger on new trends you could not alert on before. For example, you can alert on calculations that bring new meaning to each RUM event by using formulas, such as the average largest contentful paint across all of your pages. You can also alert on the relationship between RUM events by using functions, such as the change in that average from one week to the next.

Formulas

A formula allows you to perform arithmetic on a query result. You can also calculate the sum, difference, average, or other arithmetic operation between two or more queries. This technique allows you to perform useful tasks such as generating a monitor on a percentage or on an average result, allowing you to reduce alert fatigue on monitors that are subject to fluctuation.

A screenshot shows the controls for defining a RUM monitor query using a formula.
A screenshot shows the controls for defining a RUM monitor query using a formula.

Functions

Functions provide higher-level mathematics to help you easily transform the result of your query into actionable insights. For example, you can use the timeshift function to compare a query to the previous day or week to identify newly emerging trends rather than relying on a simple alerting threshold. You can see other examples on the list in our library of functions.

A screenshot shows the controls for defining a RUM monitor query using a function.
A screenshot shows the controls for defining a RUM monitor query using a function.

Use formulas and functions to build meaningful monitors

In many cases, such as hourly fluctuations in user traffic, alerting on a single RUM query doesn’t allow you to identify and alert on meaningful changes on your application’s usage and performance. For example, an alert that triggers based on the number of successful checkouts might give you a false positive in the evenings when traffic dips. Formulas and functions help you solve this problem. In this section, we’ll show you examples of RUM monitors that use formulas and functions to give a clearer picture of how users experience your application.

Ratios and percentages

By alerting on your RUM data as a ratio or percentage of overall activity, you can do useful things like normalize the number of visits to a page on your site or the number of frozen frames users have encountered. Ratios and percentages can help you to better understand your RUM data irrespective of raw counts and to alert only when something new is impacting your users, regardless of normal traffic variations.

The screenshot below shows a RUM monitor that tracks the rate of errors on the /cart view in the Shop.ist application. One query counts the number of times an error occurs, and a second counts the total number times the view is loaded. The formula divides the result of the first query by the result of the second query and then multiplies that result by 100 to express it as a percentage. By alerting on the percentage of views that result in an error instead of on the number of errors, a monitor like this can more accurately indicate a potential technical issue as opposed to a jump in traffic.

A screenshot shows a RUM monitor based on data from the Shop.ist application. One query counts the number of times an error occurs on the cart view, and the second counts the total number of times that view was loaded. A formula divides the result of the first query by the result of the second and multiplies the result by 100.
A screenshot shows a RUM monitor based on data from the Shop.ist application. One query counts the number of times an error occurs on the cart view, and the second counts the total number of times that view was loaded. A formula divides the result of the first query by the result of the second and multiplies the result by 100.

Comparisons to previous time periods

In some cases, you can reduce monitor fatigue by comparing your RUM data to an earlier value and identifying anomalous changes to application performance and behavior. This strategy can help you understand the impact of a change—such as a new version of your application or a marketing campaign aimed at changing user behavior—by comparing the value of the data before and after that change. The screenshot below, for example, shows an alert that will trigger if a page’s load time is 20 percent higher compared to the same page’s load time one week earlier. This alert, if triggered, could indicate that a code deployment or other change has introduced latency.

A screenshot shows a RUM monitor based on data from the Shop.ist application. One query gets the average load time of a single path, and the second query gets the same value from one week earlier. A formula calculates the difference and expresses it as a percentage.
A screenshot shows a RUM monitor based on data from the Shop.ist application. One query gets the average load time of a single path, and the second query gets the same value from one week earlier. A formula calculates the difference and expresses it as a percentage.

Incorporate formulas and functions in your RUM monitoring

RUM provides visibility into the health of applications and the behavior of your customers. Formulas and functions let you alert on your RUM data with greater detail, giving your team richer, more actionable alerts. See our documentation for information about how to get started using formulas and functions in your RUM monitors, as well as your dashboards and notebooks. Or if you haven’t started using Datadog yet, sign up for a free 14-day trial.