Deploy the APM Browser Agent With Your Application
You can deploy the APM browser agent by inserting a JavaScript in all your
application pages and allow Application Performance Monitoring to
report on real user experience.
Note
The details of where and how to insert the JavaScript are specific to the monitored application.
APM Java agent: When the APM Java agent is deployed, it can also be configured to inject the APM Browser Agent script automatically. This includes the packaged application specific script if applicable.
To insert the JavaScript:
Edit the HTML source of monitored application pages.
Note
For packaged web applications, there is typically a page
template used for all pages belonging to the web application.
The configuration can be stored in either the
window.apmrum or document.apmrum
object.
Make sure to use the same object consistently to
avoid confusing configurations. Lazy loading is used for the object
properties and updates are applied dynamically.
Specify values for the following properties and insert the script after the closing </head> tag. Ensure that you do not add the code within another <script> tag:
window.apmrum.serviceName: Specify a name for the service. If you do not specify the service name, the default service name, APM Browser, is assigned. It's recommended that you specify a service name to be able to filter by service and monitor the corresponding spans.
window.apmrum.webApplication: Specify a name for the web application, which can be used to classify functional areas of deployment. If no value for webApplication is specified, the default value "Default WebApp" will be used.
window.apmrum.ociDataUploadEndpoint: Specify the Data Upload Endpoint which determines the data center and domain to which RUM data will be uploaded. The Data Upload Endpoint value can be obtained doing the following:
Go to the OCI Console, navigate to Observability & Management > Application Performance Management > Administration and select the desired domain.
Click Copy next to Data Upload Endpoint to copy the value into your clipboard and use it to set the value of window.apmrum.ociDataUploadEndpoint.
window.apmrum.OracleAPMPublicDataKey: Specify the public dataKey that is generated when the APM domain is created. The public dataKey can be obtained doing the following:
Go to the OCI Console, navigate to Observability & Management > Application Performance Management > Administration and select the desired Compartment and Domain.
Click on Data Keys under Resources. If no data key exists then click on Generate Data Key and select Public Data Key.
Click on Copy which it's next to a data key of type 'Public' to retrieve the value to be used to populate the value of window.apmrum.OracleAPMPublicDataKey.
To optimize performance for users of the monitored application, the location of a JavaScript library has to be specified, and you must ensure that the JavaScript library is accessible in your network.
<APM Browser> is the service name value that you specify for your APM Browser agent. If you don't set a value, the default service name APM Browser is assigned.
<APM Public Datakey> is the APM Public Datakey value that can be obtained from the Administration menu in the APM main page.
For example, if the Data Upload Endpoint value is aaaac5d2kke6waaaaaaaaaaala.apm-agt.us-ashburn-1.oci.oraclecloud.com and the APM Public Datakey value is IMWJ5UN2C6YOLQSUZ5Q7IGN3QACF4AZD, the script will look like the following:
Using the reference to<ociDataUploadEndpoint>/static/jslib/apmrum.min.js in your instrumentation ensures that APM monitoring always takes advantage of the latest version available of the APM Browser Agent.
Deploy the APM Browser Agent With
Packaged Applications 🔗
When monitoring packaged applications, it is possible to use a specific
script that helps capturing the characteristics of that packaged application. This can be
used to reduce the need of manual configuration to capture package application
specifics.
You can use a specific set of javascript code when using one of the
following supported packaged application:
Oracle E-Business Suite.
PeopleSoft.
Siebel.
Oracle Business Intelligence Enterprise Edition (OBIEE).
Visual Builder Studio.
The script tracks the characteristics of the specific packaged
application, recognizes the specific areas in the url/DOM and uses them to enrich
the spans with additional attributes.
To deploy the browser agent with a packaged application, do the
following:
For example, if you are using Oracle E-Business
Suite applications (the library name is
apmrum.ebs.base.min.js) and the APM Data Upload
Endpoint value is
aaaac5d2kke6waaaaaaaaaaala.apm-agt.us-ashburn-1.oci.oraclecloud.com,
the script looks like the following: