Skip to main content

WebLogic

This guide explains how to instrument a Java application running on WebLogic by selecting a Linux agent or Windows agent for trace ingestion.

Prerequisites

  • The Motadata Agent must be installed and running on the server where the WebLogic-based application is deployed. The otelcol must be running as part of the Motadata Agent. To check the agent status, open a Linux terminal and run:
service motadata-agent status
  • Java version must be 8 or higher:
java -version
  • The WebLogic domain directory (i.e., DOMAIN_HOME/bin/setDomainEnv.sh) is available.
  • You have permission to edit WebLogic domain configuration and restart WebLogic.
  • Confirm how WebLogic is started in your environment. Script-based startup is assumed in this guide.

Configuration Steps

Step1: Register the Application Service in Motadata ObserveOps (formerly known as AIOps)

Go to Menu > Settings > APM > Application Registration. Clicking the Application Registration button, you can register a new application.

From the application registration screen, select the instrumentation type Host/VM or Docker.

Java application registration screen showing Host/VM instrumentation type selected

Java Trace Configuration

FieldDescription
Select AgentSelect the Host/VM where this application is running.
Select LanguageSelect Java from the language icons.
Business ServiceThe business service represents a logical grouping of related microservices under a single business application (for example, Order Management). Add or select an available service group from the drop-down to add your application service to the dedicated business service group.
Service NameProvide a unique and meaningful name (for example, ERP).
Application PathSpecify the full path to the executable file used to start the application (for example, your WebLogic startup path if required by your internal standard).
Service Attributes (Tags)Add key-value tags to your application for better filtering and organizing data in Explorer. Attribute keys must be in lowercase (for example, apm.env = prod). To add multiple Key-Value pairs, click the add icon.
Add Custom ParametersDefine custom sampling or tagging parameters for advanced use cases. These optional parameters are passed to the agent (for example, version=4).

Clicking the Apply Configuration button, you need to run the displayed Setup Command to instrument your Java application. Add the displayed argument to your java -jar command and restart the service to collect traces.

Step2: Configure WebLogic for Instrumentation

WebLogic instrumentation loads the Motadata Java Agent on every server startup. Follow the instructions based on how WebLogic is started in your environment.

WebLogic Admin Server Started Using Startup Script

Locate startWebLogic.sh

Go to your WebLogic domain directory:

<DOMAIN_HOME>/bin/startWebLogic.sh

Replace <DOMAIN_HOME> with your WebLogic domain path (for example, /u01/oracle/domains/base_domain).

Stop WebLogic

Use your standard stop method:

<DOMAIN_HOME>/bin/stopWebLogic.sh

Add Motadata Java Agent Configuration

Open startWebLogic.sh and add the following export before the line that launches the JVM:

export JAVA_OPTIONS="$JAVA_OPTIONS \
-javaagent:/motadata/motadata/instrumentation/agents/java/motadata-javaagent.jar \
-Dotel.javaagent.configuration-file=/motadata/motadata/config/<ServiceName>.properties"

Replace <ServiceName> with the exact service name you registered in Motadata ObserveOps.

Start WebLogic

<DOMAIN_HOME>/bin/startWebLogic.sh

Ensure WebLogic starts successfully and the Java agent loads without errors.

Step3: Verify APM Trace Ingestion

Once the application is running, verify the following:

  • Confirm that the service has been registered successfully.
  • On the service registration screen, the Service Trace Collection Status should display Running.
  • Generate traffic on the application (open UI pages or call APIs) and confirm traces appear in APM Explorer.