The Mendix Cloud integration collects and sends inventory and metrics from your Mendix Cloud Environment to New Relic so you can monitor its health and performance.
Read on to install the integration, and to see what data we collect.
Setup
To make use of New Relic, you need a New Relic API key. To find an existing key or request a new one for your app, follow these steps:
- Log in to your New Relic account.
- Open the user menu options by clicking your name in the lower-left corner. Then click API Keys.
- Copy an existing API key or create a new one. For this purpose, New Relic recommends the
License
type.
重要
New Relic logging and application metrics are supported in Mendix 9.7 and above.
Connecting Your environment to New Relic
To send your runtime information to New Relic, you must provide the New Relic API key to your environment.
- Go to the Environment page of your app in the Developer Portal.
- Click Details on the environment you wish to monitor with New Relic.
- Switch to the Details tab.
- Add the following custom environment variables:
Variable Description NEW_RELIC_LICENSE_KEY
New Relic License key. NEW_RELIC_LOGS_URI
URI for the New Relic’s Logs API. For more information, consult New Relic Regions. For valid values, see Send your logging data with our log API Example: https://log-api.eu.newrelic.com/log/v1
NEW_RELIC_METRICS_URI
URI for the New Relic’s Metrics API. For more information, consult New Relic Regions. For valid values, see Report metrics via the metric API. Example: https://metric-api.eu.newrelic.com/metric/v1
.NEW_RELIC_APP_NAME
(optional)Mendix application name shown on New Relic’s APM & Services page. Default: Domain host name. LOGS_REDACTION
(optional)Email addresses are automatically redacted before log entries are sent to New Relic. To disable this redaction, set LOGS_REDACTION
tofalse
. Default:true
. - Return to the Environments page for your app and Deploy or Transport your app into the selected environment.
重要
To start sending data to New Relic, you must redeploy your app and then restart it. Just restarting the app is not sufficient because additional dependencies need to be included.
Tagging metrics for New Relic
To help you with analyzing your app metrics as described in the App Metrics section of Monitoring Your Mendix Apps with an APM Tool, Mendix adds tags to metrics from microflows and activities when using New Relic.
In addition to the runtime application logs, the following JSON-formatted metadata is automatically sent to New Relic:
environment_id
: Unique identifier of the environmentinstance_index
: Number of the application instancehostname
: Name of the application hostapplication_name
: Default application name, retrieved from the domain namemodel_version
: Model version of the Mendix runtimeruntime_version
: Version of the Mendix runtime
You can filter the data by these fields.
Custom tags
If you use New Relic to monitor more than one app and environment, you will not be able to tell which app or environment these metrics apply to. To identify the metrics for your app and environment in New Relic, you need to add tags for the app name and environment.
Mendix recommends using the following tags:
app:{app_name}
(for example,app:customermanagement
): This enables you to identify all metrics sent from your appenv:{environment_name}
(for example, `env:accp``): This enables you to identify metrics sent from a particular environment so you can separate out production metrics from test metrics