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 the Dynatrace SaaS infrastructure.
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.
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
-
In the Dynatrace menu, 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 Capturing > Advanced setup.
-
In the JavaScript library section, find Specify path where JavaScript tag should send monitoring data and enter the relative beacon endpoint URL.
For example, if the RUM beacons of your application are currently sent to
/rb_abcdefghi
and you set Specify path where JavaScript tag should send monitoring data 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.If you provide an absolute beacon endpoint URL, the beacons will be sent in CORS mode even though they're same-origin beacons, and OneAgent will apply the beacon origin allowlist to them.
Auto-injected app Send beacons to Dynatrace SaaS infrastructure
If you want the RUM beacons of an auto-injected application to be handled by the Dynatrace SaaS infrastructure instead of OneAgent, follow the steps below.
First, you need to get the reportUrl
value of an agentless application (available on the Applications set up for agentless monitoring page in the Dynatrace web UI), and then specify the obtained reportUrl
value in your application settings.
-
Obtain the
reportUrl
value of an agentless application.-
In the Dynatrace menu, go to Deploy Dynatrace.
-
Under No access to your host?, select Set up agentless or AMP monitoring.
-
Select the applications currently set up for agentless monitoring link.
-
On the Applications set up for agentless monitoring page, find the required application and its RUM JavaScript.
-
In the RUM JavaScript, find
reportUrl
and copy its value. Include the/bf
part, for example,https://xxxxxx.bf.dynatrace.com/bf
.
Alternatively, use the Dynatrace API to fetch the RUM JavaScript used for your application, and then look for the beacon endpoint URL (
reportUrl
). -
-
In the Dynatrace menu, go to Web and select the auto-injected application that you want to configure.
-
In the upper-right corner of the application overview page, select More (…) > Edit.
-
From the application settings, select Capturing > Advanced setup.
-
In the JavaScript library section, find Specify path where JavaScript tag should send monitoring data and paste the value of
reportUrl
.
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
. -
In the Dynatrace menu, 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 Capturing > Advanced setup.
-
In the JavaScript library section, find Specify path where JavaScript tag should send monitoring data and enter the beacon endpoint that you determined in step 2.
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 the Dynatrace SaaS infrastructure 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
-
In the Dynatrace menu, 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.
-
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
. -
In the Dynatrace menu, 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.
-
In the JavaScript library section, find Specify path where JavaScript tag should send monitoring data and enter the beacon endpoint URL that you determined in step 6.
-
Turn on Instrument web server.
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).