Skip to content

[RUM-9722] Add remote configuration instructions to all auto injection setup #29005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/en/real_user_monitoring/browser/setup/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ There are two ways to instrument your application: automatic or manual instrumen
{{< partial name="whats-next/whats-next.html" >}}

[1]: /real_user_monitoring/browser/setup/server
[2]: /real_user_monitoring/browser/setup/client
[2]: /real_user_monitoring/browser/setup/client
34 changes: 3 additions & 31 deletions content/en/real_user_monitoring/browser/setup/server/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,19 @@ RUM Auto-Instrumentation works by injecting the RUM Browser SDK into the HTML re

## Getting started

### Remotely configure your RUM applications in Datadog

Remotely manage your RUM application configurations directly from Datadog, after having them auto-instrumented with the RUM SDK.
If you want to manage RUM configs in your web server files instead, see [Non-remote managed applications](#non-remote-managed-applications).

The following configurations can be remotely managed:

- Session sampling rate
- Session Replay sampling rate
- Session Replay privacy setting
- Action name privacy setting
- Environment (attribute)
- Service name (attribute)

To remotely configure your RUM application:

1. Make sure you have [Remote Configuration][1] enabled in Datadog.
1. In Datadog, navigate to the [**Digital Experience > Add an Application Page**][2] and select the JavaScript (JS) application type.
1. Select **Auto-Instrumentation**.
1. Configure all desired settings.
1. Click **Save Changes**.
1. Click the tab for your web server.
1. Copy and run the command shown.
1. Restart your web server.

### Non-remote managed applications
### Select a platform to start collecting RUM data on your application

<div class="alert alert-warning">To request support for a web server that is not listed here, <a href="https://www.datadoghq.com/private-beta/rum-sdk-auto-injection/">fill out this form.</a></div>

If you don't want to configure your RUM applications remotely, follow the documentation for your web server type to configure your RUM application locally:

<br>
{{< partial name="rum/rum-browser-setup.html" >}}
<br>

## Limitations

Keep in mind the following limitations when using this setup:
Keep in mind the following limitations when using auto-instrumentation:

- This instrumentation method **does not support [advanced RUM configurations][1]**, except for `allowedTracingUrls` and `excludedActivityUrls`.
- This instrumentation method **does not support [advanced RUM configurations][1]**.
- If your web server is acting as a proxy and the upstream server uses **end-to-end encryption (TLS)** or **content compression** (gzip, zstd, Brotli), the RUM Browser SDK **cannot be injected**. To ensure proper instrumentation:
- **Disable content compression** on the upstream server.
- **Enable TLS origination** on the web server.
Expand All @@ -70,4 +43,3 @@ Keep in mind the following limitations when using this setup:
{{< partial name="whats-next/whats-next.html" >}}

[1]: /agent/remote_config/
[2]: https://app.datadoghq.com/rum/list
92 changes: 45 additions & 47 deletions content/en/real_user_monitoring/browser/setup/server/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ further_reading:

## Overview

RUM Auto-Instrumentation works by injecting the RUM Browser SDK into the HTML responses being served through a web server or proxy.
RUM Auto-Instrumentation works by injecting the RUM Browser SDK into the HTML responses being served through a web server or proxy. This method leverages the [Apache httpd Modules capability][3] to implement a response body filter. The filter injects the RUM Browser SDK into the response body for responses
identified as HTML.

To understand important limitations and compatibility requirements, see [Limitations][1].

Expand All @@ -24,36 +25,65 @@ The [Datadog Agent][2] is installed and configured.

## Set up your RUM application

The auto-instrumentation method leverages the [Apache httpd Modules capability][3] to implement a response body filter. The filter injects the RUM Browser SDK into the response body for responses
identified as HTML.

For more granular control over the instrumentation of the RUM application, you can also **manually** install and configure the module.

{{% collapse-content title="Automatic installation (recommended)" level="h5" %}}

To automatically instrument your RUM application:

1. In Datadog, navigate to the [**Digital Experience > Add an Application Page**][4] and select the JavaScript (JS) application type.
1. In Datadog, navigate to the **Digital Experience > Manage Applications Page**, click on [**New Application**][4], and select the JavaScript (JS) application type.
2. Select **Auto-Instrumentation** and **Apache httpd**.
3. Set your Session and Session Replay sample rates. See [guidance on configuring sampling][5].
3. Configure your application parameters. See [guidance on configuring sampling][5].
{{< img src="real_user_monitoring/browser/auto-instrumentation/auto-instrumentation-configuration.png" alt="Configure your application" style="width:90%;">}}

4. Copy and run the installer command to load the Datadog httpd Module with the RUM SDK Injector onto httpd.
{{< img src="real_user_monitoring/browser/auto-instrumentation/httpd-code-snippet.png" alt="Auto-instrumentation Configuration" style="width:90%;">}}

5. After the installer successfully installs the SDK Injector, restart Apache HTTP Server to begin collecting RUM sessions.
6. (Optional) To verify the module is successfully injecting the RUM Browser SDK into HTML pages, check the error logs for relevant messages. The module logs important steps during the injection process. Ensure that Apache HTTP Server is configured with at least the `info` log level.

{{% /collapse-content %}}
Alternatively, you can [manually](#alternative-installation-method) install and configure the module.

## Updating your RUM application

You can adjust your Session Sampling and Session Replay Sampling rates from the Application Management page.

To update your RUM Application:

1. Go to your RUM application from the [Application Management][4] list.
2. On the **SDK Configuration** page, adjust the slider or enter a specific percentage in the input box for Session Sampling or Session Replay Sampling.
3. Copy and paste the configuration snippet to your `/opt/datadog-httpd/datadog.conf` file.

## Troubleshooting

### RUM is not injected

If you notice that RUM is not being injected into HTML pages, consider the following potential causes:

- **Content-Type mismatch**: RUM is injected only into HTML pages. If the `Content-Type` header does not correctly indicate `text/html`, the injection is skipped.

### Limitations

See other [Limitations][1].

## Uninstall

To manually remove RUM from your auto-instrumented web server:

1. Locate the Apache (`httpd`) configuration file by running `httpd -V`. Depending on the Linux distribution used, this binary file could be named `http`, `apachectl`, `apache2` or `apache2ctl`. The following steps use `httpd` as an example. In this instance, the file location could be: `/usr/local/apache2/conf/httpd.conf`.
2. At the end of the httpd configuration file, remove the line: `Include /opt/datadog-httpd/datadog.conf`.
3. Delete the directory `/opt/datadog-httpd/` and all of its contents.
4. Restart or reload Apache httpd.

{{% collapse-content title="Manual configuration" level="h5" %}}
## Alternative installation method

To manually load the module onto your web server instead of running the installation script, follow the instructions below.

To manually instrument your RUM application:

#### Download the module file
### Download the module file

1. Download the [zipped module][6].
2. Extract the zip to obtain the `mod_datadog.so` file. Move it to a location that Apache HTTP Server has access to (referenced as `<RUM_MODULE_PATH>` in the steps below).

#### Update Apache HTTP server configuration
### Update Apache HTTP server configuration

1. Locate the configuration file. You can use `apachectl -V` to find the default configuration path. Add the following line to load the module:

```javascript
Expand Down Expand Up @@ -81,43 +111,11 @@ To manually instrument your RUM application:
</DatadogRumSettings>
```

#### Restart your server
### Restart your server

1. Restart the Apache HTTP 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.
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 Apache HTTP Server is configured with at least the `info` log level.

{{% /collapse-content %}}

## Updating your RUM application

You can adjust your Session Sampling and Session Replay Sampling rates from the Application Management page.

To update your RUM Application:

1. Go to your RUM application from the [Application Management][4] list.
2. On the **SDK Configuration** page, adjust the slider or enter a specific percentage in the input box for Session Sampling or Session Replay Sampling.
3. Copy and paste the configuration snippet to your `/opt/datadog-httpd/datadog.conf` file.

## Troubleshooting

### RUM is not injected

If you notice that RUM is not being injected into HTML pages, consider the following potential causes:

- **Content-Type mismatch**: RUM is injected only into HTML pages. If the `Content-Type` header does not correctly indicate `text/html`, the injection is skipped.

### Limitations
See other [Limitations][1].

## Uninstall

To manually remove RUM from your auto-instrumented web server:

1. Locate the Apache (`httpd`) configuration file by running `httpd -V`. Depending on the Linux distribution used, this binary file could be named `http`, `apachectl`, `apache2` or `apache2ctl`. The following steps use `httpd` as an example. In this instance, the file location could be: `/usr/local/apache2/conf/httpd.conf`.
2. At the end of the httpd configuration file, remove the line: `Include /opt/datadog-httpd/datadog.conf`.
3. Delete the directory `/opt/datadog-httpd/` and all of its contents.
4. Restart or reload Apache httpd.

## Further reading

{{< partial name="whats-next/whats-next.html" >}}
Expand Down
112 changes: 53 additions & 59 deletions content/en/real_user_monitoring/browser/setup/server/ibm.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ further_reading:

## Overview

RUM Auto-Instrumentation works by injecting the RUM Browser SDK into the HTML responses being served through a web server or proxy.
RUM Auto-Instrumentation works by injecting the RUM Browser SDK into the HTML responses being served through a web server or proxy. This method leverages the [Apache httpd Modules capability][3] to implement a response body filter. The filter injects the RUM Browser SDK into the response body for responses
identified as HTML.

To understand important limitations and compatibility requirements, see [Limitations][1].

Expand All @@ -24,47 +25,72 @@ The [Datadog Agent][2] is installed and configured.

## Set up your RUM application

The auto-instrumentation method leverages the [Apache httpd Modules capability][3] to implement a response body filter. The filter injects the RUM Browser SDK into the response body for responses
identified as HTML.
To automatically instrument your RUM application:

For more granular control over the instrumentation of the RUM application, you can also **manually** install and configure the module.
1. In Datadog, navigate to the **Digital Experience > Manage Applications Page**, click on [**New Application**][4], and select the JavaScript (JS) application type.
2. Select **Auto-Instrumentation** and **Apache httpd**.
3. Configure your application parameters. See [guidance on configuring sampling][5].
{{< img src="real_user_monitoring/browser/auto-instrumentation/auto-instrumentation-configuration.png" alt="Configure your application" style="width:90%;">}}

{{% collapse-content title="Automatic installation (recommended)" level="h5" %}}
4. Copy and run the installer command to load the Datadog httpd Module with the RUM SDK Injector onto httpd.
{{< img src="real_user_monitoring/browser/auto-instrumentation/httpd-code-snippet.png" alt="Auto-instrumentation Configuration" style="width:90%;">}}

To automatically instrument your RUM application:
5. After the installer successfully installs the SDK Injector, restart Apache HTTP Server to begin collecting RUM sessions.
6. (Optional) To verify the module is successfully injecting the RUM Browser SDK into HTML pages, check the error logs for relevant messages. The module logs important steps during the injection process. Ensure that Apache HTTP Server is configured with at least the `info` log level.

1. In Datadog, navigate to the [**Digital Experience > Add an Application Page**][1] and select the JavaScript (JS) application type.
2. Select **Auto-Instrumentation** and **httpd**.
3. Set your Session and Session Replay sample rates. See [guidance on configuring sampling][2].
4. Copy and run the installer command to load the Datadog httpd Module with the RUM SDK Injector onto httpd.
5. After the installer successfully installs the SDK Injector, restart IBM HTTP Server to begin collecting RUM sessions.
6. (Optional) To verify the module is successfully injecting the RUM Browser SDK into HTML pages, check the error logs for relevant messages. The module logs important steps during the injection process. Ensure that IBM HTTP Server is configured with at least the `info` log level.
Alternatively, you can [manually](#alternative-installation-method) install and configure the module.

## Updating your RUM application

[1]: https://app.datadoghq.com/rum/list
[2]: /real_user_monitoring/guide/sampling-browser-plans/
You can adjust your Session Sampling and Session Replay Sampling rates from the Application Management page.

{{% /collapse-content %}}
To update your RUM Application:

1. Go to your RUM application from the [Application Management][4] list.
2. On the **SDK Configuration** page, adjust the slider or enter a specific percentage in the input box for Session Sampling or Session Replay Sampling.
3. Copy and paste the configuration snippet to your `/opt/datadog-httpd/datadog.conf` file.

## Troubleshooting

### RUM is not injected

{{% collapse-content title="Manual configuration" level="h5" %}}
If you notice that RUM is not being injected into HTML pages, consider the following potential causes:

- **Content-Type mismatch**: RUM is injected only into HTML pages. If the `Content-Type` header does not correctly indicate `text/html`, the injection is skipped.

### Limitations

See other [Limitations][1].

## Uninstall

To manually remove RUM from your auto-instrumented web server:

1. Locate the IBM HTTP server (`httpd`) configuration file by running `httpd -V`. Depending on the Linux distribution used, this binary file could be named `http`, `apachectl`, `apache2` or `apache2ctl`. The following steps use `httpd` as an example. In this instance, the file location could be: `/usr/local/apache2/conf/httpd.conf`.
2. At the end of the file, remove the line: `Include /opt/datadog-httpd/datadog.conf`.
3. Delete the directory `/opt/datadog-httpd/` and all of its contents.
4. Restart or reload the IBM HTTP Server.

## Alternative installation method

To manually load the module onto your web server instead of running the installation script, follow the instructions below.

To manually instrument your RUM application:

#### Download the module file
### Download the module file

1. Download the [zipped module][4].
2. Extract the zip to obtain the `mod_datadog.so` file. Move it to a location that IBM HTTP Server has access to (referenced as `<RUM_MODULE_PATH>` in the steps below).
1. Download the [zipped module][6].
2. Extract the zip to obtain the `mod_datadog.so` file. Move it to a location that Apache HTTP Server has access to (referenced as `<RUM_MODULE_PATH>` in the steps below).

#### Update IBM HTTP server configuration
### Update Apache HTTP server configuration

1. Locate the configuration file. You can use `apachectl -V` to find the default configuration path. Add the following line to load the module:

```javascript
LoadModule datadog_module <RUM_MODULE_PATH>
```

2. Within the appropriate **root or location** section, add the following:
2. Within the appropriate **root** or **location** section, add the following:

```javascript
# APM Tracing is enabled by default. The following line disables APM Tracing
Expand All @@ -85,43 +111,10 @@ To manually instrument your RUM application:
</DatadogRumSettings>
```

#### Restart your server

1. Restart the IBM HTTP 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.
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 IBM HTTP Server is configured with at least the `info` log level.

{{% /collapse-content %}}

## Updating your RUM application

You can adjust your Session Sampling and Session Replay Sampling rates from the Application Management page.


To update your RUM Application:

1. Go to your RUM application from the [Application Management][5] list.
2. On the **SDK Configuration** page, adjust the slider or enter a specific percentage in the input box for Session Sampling or Session Replay Sampling.
3. Copy and paste the configuration snippet to your `/opt/datadog-httpd/datadog.conf` file.

## Troubleshooting

### RUM is not injected

If you notice that RUM is not being injected into HTML pages, consider the following potential causes:

- **Content-Type mismatch**: RUM is injected only into HTML pages. If the `Content-Type` header does not correctly indicate `text/html`, the injection is skipped.

### Limitations
See other [Limitations][1].
### Restart your server

## Uninstall

To manually remove RUM from your auto-instrumented web server:

1. Locate the IBM HTTP server (`httpd`) configuration file by running `httpd -V`. Depending on the Linux distribution used, this binary file could be named `http`, `apachectl`, `apache2` or `apache2ctl`. The following steps use `httpd` as an example. In this instance, the file location could be: `/usr/local/apache2/conf/httpd.conf`.
2. At the end of the file, remove the line: `Include /opt/datadog-httpd/datadog.conf`.
3. Delete the directory `/opt/datadog-httpd/` and all of its contents.
4. Restart or reload the IBM HTTP Server.
1. Restart the Apache HTTP 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.
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 Apache HTTP Server is configured with at least the `info` log level.

## Further reading

Expand All @@ -130,5 +123,6 @@ To manually remove RUM from your auto-instrumented web server:
[1]: /real_user_monitoring/browser/setup/server/#limitations
[2]: /agent/
[3]: https://httpd.apache.org/modules/
[4]: https://rum-auto-instrumentation.s3.amazonaws.com/httpd/latest/mod_datadog-amd64.zip
[5]: https://app.datadoghq.com/rum/list
[4]: https://app.datadoghq.com/rum/list
[5]: /real_user_monitoring/guide/sampling-browser-plans/
[6]: https://rum-auto-instrumentation.s3.amazonaws.com/httpd/latest/mod_datadog-amd64.zip
Loading
Loading