
Sarjeel Yusuf

Stella Ma
Achieving end-to-end observability for applications is a top priority for organizations today, but instrumenting for both frontend and backend monitoring can be a significant hurdle. What complicates matters is that the SREs and DevOps teams responsible for deploying monitoring tools typically don’t own frontend code or have the context needed to safely modify it. This means that those backend teams need to coordinate with frontend teams to instrument the frontend code, making end-to-end instrumentation a cumbersome process.
To reduce this friction, Datadog now lets teams use a single command to enable both frontend and backend visibility for Java applications. When you install or update the Datadog Agent, you now have the option to enable Real User Monitoring (RUM) along with Application Performance Monitoring (APM). Datadog then automatically instruments Java applications for both APM and RUM, without requiring you to make any code changes or configure the applications directly.
In this post, we’ll cover how you can:
- Easily instrument Java applications for both APM and RUM
- Troubleshoot issues faster with unified frontend and backend context
Easily instrument Java applications for both APM and RUM, without frontend changes
For DevOps and SREs teams, one of the biggest barriers to gaining end-to-end visibility into their web applications has been the need to manually modify frontend code. While using single-step instrumentation (SSI) for APM has been possible, engineers can now also automatically add RUM functionality to their servlet-based web applications at the same time. The single step to configure both frontend and backend monitoring is performed when you install or update the Datadog Agent. You simply choose your platform for installing the Agent, enable both APM and RUM, and follow the instructions for running the installation command.

When you run the command, Datadog’s SSI mechanism automatically loads the Datadog language SDKs into the application processes. The RUM JavaScript snippet is also automatically loaded into HTML responses, capturing page loads, navigations, and user actions. Enabling RUM through SSI is currently available via the Java SDK on servlet-based app servers such as Tomcat, Jetty, WildFly, and WebLogic.
Then, after you restart the application, Datadog immediately starts discovering backend services through APM, capturing traces that provide visibility into how your services are performing and forming a service map based on production traffic. In parallel, with RUM configured, you can also see frontend user session data, such as page views, user actions, errors, and performance metrics. These RUM sessions are correlated with backend traces, helping you pinpoint which backend services are impacting real user experiences.

Use advanced configuration to collect user sessions and set APM correlation
Automatically enabling frontend monitoring through SSI sets up basic RUM functionality. You can then configure additional settings through the SDK Configuration page in the Datadog UI, allowing you to update RUM application settings without redeploying your application. For example, you can configure user information (such as email or account ID) to be captured, or configure allowTracingURL to ensure accurate correlation between frontend sessions and backend traces.

Troubleshoot issues faster with unified frontend and backend context
RUM and APM are most powerful when used together during incident investigation. RUM shows what real users experience, including slow page loads, errors, and frustration signals. APM, meanwhile, shows what’s happening inside backend services, including latency, errors, and downstream dependencies.
To illustrate how frontend and backend monitoring work better together, let’s suppose that an ecommerce company has used SSI to instrument its web application for APM and RUM. One day, an engineer notices an increase in checkout failures. RUM highlights a spike in page load times and error rates for the checkout page, along with a growing number of impacted user sessions. From one of these sessions, the engineer can then pivot directly into the correlated APM trace for the user action that triggered the issue. The APM trace might reveal that a service downstream of checkout is showing increased latency. In this case, the latency surfaced by APM provides an explanation for the degraded checkout experience users are seeing in the browser. This scenario illustrates how, instead of guessing whether the issue is frontend or backend, the engineer can quickly identify the root cause and then focus remediation efforts where they are needed.
Get started with single step instrumentation for Java
Single-step instrumentation of RUM and APM makes it easier than ever to achieve end-to-end observability for Java servlet applications. By removing the need for frontend code changes and reducing cross-team coordination, teams can easily gain a unified view of user experience and backend performance to remediate issues faster.
To learn more about supported app servers and configuration options, see the Datadog documentation. If you’re new to Datadog, sign up for a 14-day free trial.





