- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Datadog RUM Server-Side Instrumentation (Auto-Instrumentation) lets you opt into Real User Monitoring (RUM) automatically by instrumenting web applications served through a web server or proxy.
RUM Auto-Instrumentation works by injecting a RUM SDK JavaScript scriptlet into the HTML responses being served through a web server or proxy.
After your applications have been instrumented, you can configure your RUM application in Datadog.
The available functionality has the following important limitations:
allowedTracingUrls
and excludedActivityUrls
are supported for NGINX web servers.The automatic installation method requires that you have the Datadog Agent installed.
The Auto-Instrumentation method leverages the NGINX Dynamic Modules capability to implement a response body filter. The filter injects the RUM SDK into the response body for responses identified as HTML. For more granular control over how configuration files or permissions are handled, you can also install NGINX manually.
To automatically instrument your RUM application:
In Datadog, navigate to the Digital Experience > Add an Application Page and select the JavaScript (JS) application type.
Select Auto-Instrumentation and NGINX.
Set your Session and Session Replay sample rates. See guidance on configuring sampling.
Copy and run the installer command to load the Datadog NGINX Module with the RUM SDK Injector onto NGINX.
After the installer successfully installs the SDK Injector, restart NGINX to begin collecting RUM sessions.
(Optional) To verify the module is successfully injecting the RUM Browser SDK into HTML pages, check the NGINX error logs for relevant messages. The module logs important steps during the injection process. Ensure that NGINX is configured with at least the INFO
log level with the following:
error_log <file> info;
.tgz
file.tgz
file corresponding to your version of NGINX. You can find all the relevant .tgz
files listed by NGINX version under Reference.ngx_http_datadog_module.so
file. Move it to a location that NGINX has access to (referenced as <RUM_MODULE_PATH>
in the steps below).The nginx.conf
file is usually located in NGINX’s configuration directory. Add the following line to load the module:
load_module <RUM_MODULE_PATH>;
Then in the http/server/location section, add the following:
# APM Tracing is enabled by default. The following line disables APM Tracing.
datadog_disable;
datadog_rum on;
datadog_rum_config "v5" {
"applicationId" "<DATADOG_APPLICATION_ID>";
"clientToken" "<DATADOG_CLIENT_TOKEN>";
"site" "<DATADOG_SITE>";
"service" "my-web-application";
"env" "production";
"version" "1.0.0";
"sessionSampleRate" "100";
"sessionReplaySampleRate" "100";
"trackResources" "true";
"trackLongTasks" "true";
"trackUserInteractions" "true";
}
Restart the NGINX server to begin collecting data for your Datadog RUM application. By default, the RUM SDK is injected to all HTML documents. You may need to clear your browser cache.
(Optional) To verify the module is successfully injecting the RUM Browser SDK into HTML pages, check the NGINX error logs for relevant messages. The module logs important steps during the injection process. Ensure that NGINX is configured with at least the INFO
log level with the following:
error_log <file> info;
Auto-Instrumentation leverages a Windows module that injects the RUM SDK into the response body for responses served by the IIS instance.
.msi
file.You can adjust your Session Sampling and Session Replay Sampling rates from the Application Management page.
To update your RUM Application:
NGINX.conf
file.To update your RUM Application:
Since the module is in Preview, it’s possible NGINX may stop serving requests, particularly after installation. If you experience this issue, contact Datadog support with the following information to help us investigate and resolve the issue:
If you notice that RUM is not being injected into HTML pages, consider the following potential causes:
Content-Type
header does not correctly indicate text/html
, the injection is skipped.