• Log inStart now

Manage monitor runtimes

Simple browser, scripted browser, and API monitors execute in the runtime environment used when the monitors were created. Your monitors won't automatically convert to newer runtimes when those runtimes release.

Monitors running on older runtimes lose out on new runtime features, so it's important that you understand which runtimes are used by your monitors.

Read on to learn how to:

Tip

Ping monitors are not affected by changes in runtime versions.

Use different runtimes environments

View synthetic monitoring upgrade history

To see a history of monitor version upgrades, query the NrAuditEvent.

Use environment variables in runtimes

Make your scripted monitors more contextually aware by using the $env variable properties. When the script executes, these properties represent important information about the runtime environment.

You do not need to import $env because it is readily available, similar to the $browser and $http variables. For example:

console.log('running in ' + $env.LOCATION);
$browser.get('https://example.com');

$env property

Type

Scripted browser

Scripted API test

JOB_ID

Unique ID (UUIDv4) identifying the running job

string

MONITOR_ID

Unique ID (UUIDv4) identifying the running monitor

string

ACCOUNT_ID

Unique ID (number) identifying the account that owns the monitor

number

MONITOR_TYPE

Type of monitor this job is running

string

API_VERSION

API version this monitor is using

string

LOCATION

Location where this job is running. Examples:

  • aws-us-east-1
  • 123-my_location-81D (for private locations)

string

PROXY_HOST

Host of the proxy that collects HTTP traffic metrics

string

PROXY_PORT

Port of the proxy that collects HTTP traffic metrics

number

USER_DEFINED_VARIABLES (private locations)

A configurable set of variables specified by users.

See the documentation about containerized private minion (CPM) configuration.

string

Review API monitor runtime dependencies

Starting with the Node 16.10.0 runtime release, the API runtime will be managed separately from the browser runtime. This is the first scripted API runtime based on the got module instead of the deprecated request module. The got module is exposed in a request compatible format via the $http object. The request-like experience provided by the $http object will also be returned for any customers attempting to use request directly in the Node 16 and newer scripted API runtimes.

The API runtime is used for these monitor types:

  • Broken links monitor
  • Certificate check monitors
  • Scripted API monitors

Tip

If you're unsure about your monitor's runtime version, edit your monitor and check the "Runtime" drop down in the "Configure monitor" tab. You can also query the runtimeTypeVersion attribute on SyntheticCheck events where the runtimeType = 'NODE_API'.

Review browser monitor runtime dependencies

With the Chrome 100 runtime release, the [browser runtime] (/docs/synthetics/synthetic-monitoring/using-monitors/new-runtime) is managed separately from the API runtime. This is also known as our next-generation runtime.

The browser runtime is used for these monitor types:

  • Scripted brower monitors
  • Simple browser monitors
  • Step monitors

Tip

If you're unsure about your monitor's runtime version, edit your monitor and check the "Runtime" drop down on the "Configure monitor" tab. You can also query the runtimeTypeVersion attribute on SyntheticCheck events where the runtimeType = 'CHROME_BROWSER'.

Review legacy runtime dependencies

The monitor version always matches its runtime version, and determines what features the monitor can execute. The section below lists runtimes with its available features.

Tip

If you're unsure about your monitor's version, go to one.newrelic.com > Synthetics > Upgrade monitors. You won't see the Upgrade monitors option if you're already on the latest runtime version.

Here are monitor version details for all monitor types except ping:

Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.