RUM initial setup for custom applications
Monitoring data sent via Dynatrace OpenKit is encapsulated into an entity that represents your application and is called custom application. Therefore, to monitor your application, you need to define and instrument the custom application following the instructions below.
To create a custom application in the Dynatrace web UI and instrument it
- In the Dynatrace menu, go to Deploy Dynatrace.
- Under Digital touchpoint monitoring, select Monitor a custom application.
Enter a name for your custom application, and choose an icon to visually represent your application in the Dynatrace web UI.
- Select Monitor custom application. You custom application settings page opens.
- From the application settings, select Instrumentation wizard and then select your technology to download the latest OpenKit library.
- Use the downloaded library and the Beacon URL and Application ID provided in the instrumentation wizard to instrument your application.
- optional In the instrumentation wizard, select View incoming beacons to show incoming beacons as they arrive, with only a couple of seconds delay. This view also provides information about potential issues.
Below is a basic example that shows how to use Dynatrace OpenKit to send monitoring data to Dynatrace. For more details, see Dynatrace OpenKit API methods.
1// Obtain an OpenKit instance2String applicationID = "application-id"; // Your application's ID3long deviceID = 42; // Replace with a unique value per device/installation4String endpointURL = "https://tenantid.beaconurl.com/mbeacon"; // Dynatrace endpoint URL56OpenKit openKit = new DynatraceOpenKitBuilder(endpointURL, applicationID, deviceID)7 .withApplicationVersion("220.127.116.11")8 .withOperatingSystem("Windows 10")9 .withManufacturer("MyCompany")10 .withModelID("MyModelID")11 .build();1213// Wait up to 10 seconds for OpenKit to complete initialization14long timeoutInMilliseconds = 10 * 1000;15boolean success = openKit.waitForInitCompletion(timeoutInMilliseconds);1617// Create session18String clientIP = "18.104.22.168";19Session session = openKit.createSession(clientIP);2021// Identify user22session.identifyUser("email@example.com");2324// Create root and child actions25String rootActionName = "rootActionName";26RootAction rootAction = session.enterAction(rootActionName);2728String childActionName = "childAction";29Action childAction = rootAction.enterAction(childActionName);3031// Leave action32childAction.leaveAction();33rootAction.leaveAction();3435// Finish session36session.end();3738// Terminate OpenKit instance39openKit.shutdown();
You can find your application ID and the endpoint URL in the instrumentation wizard (from your application settings, select Instrumentation wizard).
After creating a custom application in the Dynatrace web UI and instrumenting your actual application with OpenKit, check the pages below to customize and troubleshoot the instrumentation.
Once your custom application starts sending monitoring data to Dynatrace, you can analyze this data just like you do for any other application. For example, you can examine user sessions, check user experience metrics, analyze web requests, view crash reports, and more.
The image below shows the overview page of our test custom application.