Configure beacon endpoint for web applications
The RUM JavaScript sends RUM beacons to report the captured data to Dynatrace. By default, the beacon endpoint depends on the injection method used for your application.
- Auto-injected applications: When the RUM JavaScript is injected automatically, beacons are sent back to your web or application server using a root-relative URL where the last path segment has the
rb_
prefix (for example,/rb_xxxxxxxxxx
or/myapplication/rb_xxxxxxxxxx
). The beacon endpoint is provided by OneAgent, which intercepts and forwards RUM beacons. - Agentless applications: If you opted for agentless monitoring, data is sent to a beacon endpoint that is part of a Cluster ActiveGate.
You usually don't need to change the default beacon endpoint, but there are certain scenarios where you might need to use an alternative beacon endpoint configuration. For example:
- If your infrastructure blocks beacons of an auto-injected application because of their default URL path.
- If you want the monitoring traffic of an auto-injected application to bypass your CDN.
- If you prefer RUM beacons not to be handled on the web or application server that hosts your application.
- If your Cluster ActiveGate is not publicly available.
The following sections describe alternative beacon endpoint configurations that allow you to accommodate these and similar constraints.
The beacon endpoint configurations explained on this page don't affect the correlation between user actions and distributed traces. However, check Technology support to see if Real User Monitoring is supported for your technology.
Auto-injected app Modify the beacon endpoint URL
Depending on your infrastructure and its configuration, it's possible that beacons can't pass with their automatically chosen URL path and thus can't be handled by OneAgent. To solve this, you can change the part of the beacon endpoint URL that comes before the rb_
prefix.
To modify the beacon endpoint URL for an auto-injected application
-
Go to Web.
-
Select the application that you want to configure.
-
In the upper-right corner of the application overview page, select More (…) > Edit.
-
From the application settings, select General settings > Beacon endpoint.
-
In the Type dropdown list, select OneAgent.
-
In URL, enter the relative beacon endpoint URL.
For example, if the RUM beacons of your application are currently sent to
/rb_abcdefghi
and you set URL to/custompath
, the beacons will be sent to/custompath/rb_abcdefghi
. You can't eliminate the path segment prefixed byrb_
, since this URL part is necessary for RUM beacon identification.
Auto-injected app Send beacons to Cluster ActiveGate
If you want the RUM beacons of an auto-injected application to be handled by your Cluster ActiveGate instead of OneAgent, follow the steps below.
- Go to Web.
- Select the application that you want to configure.
- In the upper-right corner of the application overview page, select More (…) > Edit.
- From the application settings, select General settings > Beacon endpoint.
- In the Type dropdown list, select Cluster ActiveGate.
For this configuration, Dynatrace applies the beacon origin allowlist to the RUM beacons of your application.
Auto-injected app Send beacons to a different web server
By default, the RUM beacons of an auto-injected application are handled by one of the process groups that hosts your application. Alternatively, beacons can be handled on any other instrumented web or application server of a technology listed in Technology support - Real User Monitoring - Web servers and applications.
To send beacons of an auto-injected application to a different instrumented server
-
In the injected RUM JavaScript, find
reportUrl
and copy the last segment of the URL path, which is prefixed withrb_
. -
Append this value to the URL of the instrumented web or application server.
For example, if the last segment of
reportUrl
is/rb_abcdefghi
and the server URL ishttp://www.my-server.com
, the resulting beacon endpoint URL ishttp://www.my-server.com/rb_abcdefghij
. -
Go to Web.
-
Select the application that you want to configure.
-
In the upper-right corner of the application overview page, select More (…) > Edit.
-
From the application settings, select General settings > Beacon endpoint.
-
In the Type dropdown list, select OneAgent.
-
In URL, enter the beacon endpoint that you determined in step 2.
-
Turn on Send beacon data via CORS.
For this configuration, Dynatrace applies the beacon origin allowlist to the RUM beacons of your application.
Agentless app Send beacons to a web server
Instead of using a Cluster ActiveGate as a beacon endpoint for your agentless application, you can use any instrumented web or application server of a technology listed in Technology support - Real User Monitoring - Web servers and applications.
To send beacons of an agentless application to an instrumented server
-
Go to Web.
-
Select any auto-injected application that doesn't use one of the custom beacon endpoint configurations described on this page.
In this step, you should select not the agentless application that you're configuring but another auto-injected application that has the default beacon endpoint configuration. If you don't have an auto-injected application, temporarily create one as described in Define applications for Real User Monitoring | Application detection rules approach. You can then delete this temporary application.
-
In the upper-right corner of the application overview page, select More (…) > Edit.
-
From the application settings, select Injection > Manual insertion.
-
Select the OneAgent JavaScript tag format, find
reportUrl
, and copy its value. -
Append the
reportUrl
value to the URL of the instrumented web or application server.For example, if the
reportUrl
value is/rb_abcdefghi
and the server URL ishttp://www.my-server.com
, the resulting beacon endpoint URL ishttp://www.my-server.com/rb_abcdefghij
. -
Go to Web.
-
Select the agentless application that you want to configure.
-
In the upper-right corner of the application overview page, select More (…) > Edit.
-
From the application settings, select General settings > Beacon endpoint.
-
In the Type dropdown list, select OneAgent.
-
In URL, enter the beacon endpoint that you determined in step 6.
-
Turn on Send beacon data via CORS.
For this configuration, Dynatrace applies the beacon origin allowlist to the RUM beacons of your application (the same is done for the default beacon endpoint configuration for all agentless applications).