Skip to content

Commit 1a5efc0

Browse files
Adapt RUM server onboarding to include httpd
1 parent 7580afd commit 1a5efc0

File tree

1 file changed

+83
-2
lines changed
  • content/en/real_user_monitoring/browser/setup

1 file changed

+83
-2
lines changed

content/en/real_user_monitoring/browser/setup/server.md

+83-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The available functionality has the following important limitations:
2929

3030
- If proxying compressed traffic, the Auto-Instrumentation method is not able to inject the JS scriptlet into the HTML traffic.
3131
- This instrumentation method does not support any [advanced RUM configurations][3]. However, `allowedTracingUrls` and `excludedActivityUrls` are supported for NGINX web servers.
32-
- If NGINX or IIS is acting as a proxy and the upstream server has end-to-end encryption (like TLS) enabled, the module cannot inject RUM. Ensure the web server is set up for TLS origination for successful instrumentation.
32+
- If acting as a proxy and the upstream server has end-to-end encryption (like TLS) enabled, the module cannot inject RUM. Ensure the web server is set up for TLS origination for successful instrumentation.
3333
- (Windows IIS only) Configuration for Auto-Instrumentation is only available per Windows IIS site.
3434

3535
## Prerequisites
@@ -115,6 +115,75 @@ To automatically instrument your RUM application:
115115

116116
{{% /collapse-content %}}
117117

118+
{{% /tab %}}
119+
{{% tab "httpd" %}}
120+
121+
The Auto-Instrumentation method leverages the [Apache httpd Modules capability][1] to implement a response body filter. The filter injects the RUM SDK into the response body for responses
122+
identified as HTML. For more granular control over how configuration files or permissions are handled, you can also install Apache httpd Server manually.
123+
124+
[1]: https://httpd.apache.org/modules/#apache-httpd-modules
125+
126+
127+
{{% collapse-content title="Automatic installation (recommended)" level="h5" %}}
128+
129+
To automatically instrument your RUM application:
130+
131+
1. In Datadog, navigate to the [**Digital Experience > Add an Application Page**][1] and select the JavaScript (JS) application type.
132+
2. Select **Auto-Instrumentation** and **httpd**.
133+
3. Set your Session and Session Replay sample rates. See [guidance on configuring sampling][2].
134+
4. Copy and run the installer command to load the Datadog httpd Module with the RUM SDK Injector onto httpd.
135+
5. After the installer successfully installs the SDK Injector, restart httpd to begin collecting RUM sessions.
136+
6. (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 httpd is configured with at least the `info` log level.
137+
138+
[1]: https://app.datadoghq.com/rum/list
139+
[2]: /real_user_monitoring/guide/sampling-browser-plans/
140+
141+
{{% /collapse-content %}}
142+
143+
{{% collapse-content title="Manual configuration" level="h5" %}}
144+
145+
### Download the module file
146+
147+
1. Download the [zipped module][1].
148+
2. Extract the zip to obtain the `mod_datadog.so` file. Move it to a location that httpd has access to (referenced as `<RUM_MODULE_PATH>` in the steps below).
149+
150+
[1]: https://rum-auto-instrumentation.s3.amazonaws.com/httpd/latest/mod_datadog-amd64.zip
151+
152+
### Update httpd configuration
153+
1. Locate the configuration file. You can use `apachectl -V` to see the configuration path. Add the following line to load the module:
154+
155+
```javascript
156+
LoadModule datadog_module <RUM_MODULE_PATH>
157+
```
158+
159+
2. Then in the appropriate **root or location** section, add the following:
160+
161+
```javascript
162+
# APM Tracing is enabled by default. The following line disables APM Tracing.
163+
DatadogTracing Off
164+
DatadogRum On
165+
<DatadogRumSettings>
166+
DatadogRumOption "applicationId" "<DATADOG_APPLICATION_ID>"
167+
DatadogRumOption "clientToken" "<DATADOG_CLIENT_TOKEN>"
168+
DatadogRumOption "site" "<DATADOG_SITE>"
169+
DatadogRumOption "service" "my-web-application"
170+
DatadogRumOption "env" "production"
171+
DatadogRumOption "version" "1.0.0"
172+
DatadogRumOption "sessionSampleRate" "100"
173+
DatadogRumOption "sessionReplaySampleRate" "100"
174+
DatadogRumOption "trackResources" "true"
175+
DatadogRumOption "trackLongTasks" "true"
176+
DatadogRumOption "trackUserInteractions" "true"
177+
</DatadogRumSettings>
178+
```
179+
180+
### Restart your server
181+
182+
1. Restart the httpd 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.
183+
2. (Optional) To verify the module is successfully injecting the RUM Browser SDK into HTML pages, check the httpd error logs for relevant messages. The module logs important steps during the injection process. Ensure that httpd is configured with at least the `info` log level.
184+
185+
{{% /collapse-content %}}
186+
118187
{{% /tab %}}
119188
{{% tab "Windows IIS" %}}
120189

@@ -162,7 +231,19 @@ To update your RUM Application:
162231

163232
1. Go to your RUM application from the [Application Management][1] list.
164233
2. On the Instrument your application page, adjust the slider or enter a specific percentage in the input box for Session Sampling or Session Replay Sampling.
165-
3. Copy and run the installer command in your `NGINX.conf` file.
234+
3. Copy and paste the configuration snippet to your `NGINX.conf` file.
235+
236+
[1]: https://app.datadoghq.com/rum/list
237+
238+
{{% /tab %}}
239+
240+
{{% tab "httpd" %}}
241+
242+
To update your RUM Application:
243+
244+
1. Go to your RUM application from the [Application Management][1] list.
245+
2. On the Instrument your application page, adjust the slider or enter a specific percentage in the input box for Session Sampling or Session Replay Sampling.
246+
3. Copy and paste the configuration snippet to your `/opt/datadog-httpd/datadog.conf` file.
166247

167248
[1]: https://app.datadoghq.com/rum/list
168249

0 commit comments

Comments
 (0)