Manage App Performance with New Relic
Introduction
To ensure your applications run smoothly, they need to be actively monitored so that the information is available in order to do the following:
- Avoid performance problems
- Diagnose performance problems when they occur
New Relic is a flexible application performance management tool that provides information to help you achieve the above goals.
This how-to teaches you how to do the following:
- Set up application performance management for your Mendix application on New Relic
Prerequisite
Before starting with this how-to, make sure you have completed the following prerequisite:
- Create a New Relic account by signing up here: https://newrelic.com/signup
Setting Up
In this section, we will walk through all the steps to configure New Relic so that it can be used for the application performance diagnostics of your Mendix application.
Setting Up New Relic (On-Premises Only)
The following steps are only relevant for on-premises deployments (if you are deploying your Mendix application to Cloud Foundry, skip to the Cloud Foundry section below).
-
Sign in to New Relic and create a new application:
-
Select Java:
-
Download the Java agent archive and save your license key:
-
Add your license key to the newrelic.yml file from the downloaded archive as described here: https://docs.newrelic.com/docs/agents/java-agent/installation/java-agent-manual-installation#h2-download-files.
Setting Up Your Mendix Deployment
Cloud Foundry
Follow these buildpack instructions to set up New Relic for Cloud Foundry deployments: https://github.com/mendix/cf-mendix-buildpack#new-relic.
On-Premises Linux and Windows Service Console
To the javaopts
list in your m2ee.yaml file, add “-javaagent:
javaopts: [
"-Dfile.encoding=UTF-8", "-Xmx512M", "-Xms512M",
"-Djava.io.tmpdir=/srv/mendix/data/tmp",
"-javaagent:/opt/newrelic/javaagent.jar"
]
Mendix Studio Pro (Development Mode Only)
-
Open your Mendix application, and click Settings in the App Explorer.
-
Open a configuration:
-
In the Extra JVM parameters field on the Server tab, add:
-javaagent:<path-to-javaagent>javaagent.jar
:
Transactions
After completing the steps described above, all the requests handled by your Mendix application should become visible together with various graphs and statistics:
Databases
Your database calls and queries will now be visible on the database page:
Further Documentation
For more information on New Relic, see the New Relic documentation.
Read More
- Find the Root Cause of Runtime Errors
- Clear Warning Messages in Mendix
- Monitor Mendix Using JMX
- Debug Java Actions Remotely
- Telemetry Configuration in the cf-mendix-buildpack repo on GitHub