1. Two complementary approaches #
Real and simulated.
Comparison #
| RUM | Synthetics | |
|---|---|---|
| Data | Real user sessions | Scripted, scheduled journeys |
| Detects | Real slowdowns, JavaScript errors, impact by browser or country | Outages, regressions, even before a user experiences them |
| Works at night without traffic | No | Yes |
| Billing | Sessions | Test runs |
2. RUM #
The browser.
Installation #
import { datadogRum } from '@datadog/browser-rum';
datadogRum.init({
applicationId: '<APPLICATION_ID>', clientToken: '<CLIENT_TOKEN>', site: 'datadoghq.eu',
service: 'shop-front', env: 'prod', version: '2.3.0',
sessionSampleRate: 100, sessionReplaySampleRate: 20,
trackUserInteractions: true, trackResources: true, trackLongTasks: true,
allowedTracingUrls: ['https://api.example.com'], // relie les requêtes aux traces backend
defaultPrivacyLevel: 'mask-user-input',
});- Core Web Vitals (LCP, INP, CLS) per page, browser and country.
- Session Replay to replay a session, with input masking (
defaultPrivacyLevel). allowedTracingUrlsadds tracing headers to API calls: in one click, you go from a slow action to the backend trace.
3. Synthetics #
Testing continuously.
Test types #
| Test | Checks |
|---|---|
| API (HTTP, SSL, DNS, TCP, gRPC, WebSocket) | Status, response time, content, certificate expiry |
| Multistep API | A sequence of calls with variables (login, then order) |
| Browser | A journey recorded in a real browser |
| Mobile | A journey in a mobile application |
- Managed locations (cloud regions) or private locations (a container in your network) to test internal applications.
- Running tests in CI (
datadog-ci synthetics run-tests) to block a deployment that breaks a journey. - Tests and locations managed in Terraform (
datadog_synthetics_test).
Good practice: Alert when several locations fail (for example 2 out of 3) rather than just one: a local network issue should not wake up on-call.
My progress
Sign in to track your progress and take notes. Sign in
💬 Recent discussions about this course
- Datadog : relier traces, logs et métriques du même service✓ solved · 1 reply(ies)
Ask a question about this lesson →See all discussions about this course
Recommended Articles
Real User Monitoring (RUM) and Core Web Vitals: measuring what users experience
Why observe the front end, what RUM measures, Core Web Vitals (LCP, INP, CLS) and their threshold...
Conversion funnels in RUM: measuring where users drop off
Building and reading a conversion funnel with RUM data: steps, rates, order, pitfalls, and implem...
Dynatrace Real User Monitoring: injection, web applications and verification
Set up real user monitoring in Dynatrace: automatic injection by OneAgent, agentless monitoring, ...
Dynatrace Synthetic Monitoring: complete guide and best practices
Learn how to use Dynatrace Synthetic Monitoring to proactively monitor your applications, from th...
Faro and Alloy: receiving front-end RUM with faro.receiver
Configure faro.receiver: CORS, API key, rate limiting, source maps, then send browser errors, Web...
Datadog: the SaaS observability platform at a glance
What Datadog is, its products (infrastructure, logs, APM, RUM, synthetics, security), its concept...
Analyzing user experience in Dynatrace: sessions, traces, analysis and USQL
Use digital experience (DEM) data: Apdex and Core Web Vitals, user sessions, service flows, distr...
Website monitoring: availability, HTTPS monitoring, certificates and performance
Set up website monitoring: availability and HTTPS checks, certificate expiry, response time, Core...
Experience Vitals in Dynatrace
The entry point of next-generation RUM: Core Web Vitals and mobile app startup.