Enable APM Browser Agent Injection using APM Dotnet Agent

Prerequisites

  • You need to acquire a public datakey that is generated when the APM domain is created.

    The public data key can be obtained doing the following:

    1. Open the navigation menu, click Observability & Management. Under Application Performance Monitoring, click Administration.

      On the Administration page, select the desired compartment and APM domain.

    2. Click on Data Keys under Resources to list the data keys.

      If no data key exists, then click on Generate Data Key and select the Public Data Key.

    3. Click on Copy which it's next to a data key of type Public to retrieve the value. This value will be used later on.

    For more details, see Obtain Data Upload Endpoint and Data Keys.

Enable APM Browser Agent Injection

By default, the APM Browser Agent injection is disabled.

To enable this feature, you need to add the below environment variables during Deploy the APM Dotnet Agent.

OTEL_BA_ENABLED=true
OTEL_BA_PUBLIC_KEY=<public data key>

You need to restart the corresponding Windows Services or IIS if the environment variable is added in Windows Registry.

The <public data key> value is generated when the APM domain is created. See Obtain Data Upload Endpoint and Data Keys for details. This is the browser agent installation key used by the APM Dotnet agent. For example:IMWJ5UN2C.

Additional Step for .NET Framework

To enable the browser agent injection in .NET framework, a HTTPModule needs to be added in applicationHost.config file.

Open the file C:\Windows\System32\inetsrv\config\applicationHost.config and add a HTTPModule as below:
<location path="" overrideMode="Allow">
  <system.webServer>
    <modules>
       <add name="OracleApmHttpModule" type="OracleApmNetAgentEx.BrowserAgent.Netfx.OracleAPMIisModule,  OracleApmNetAgentEx,
Version=1.0.0.0, Culture=neutral,  PublicKeyToken=ba1a243c3b2207e1" preCondition="managedHandler" />
    </modules>
  </system.webServer>
</location>