Scripted monitor version runtime environments

New Relic Synthetics scripted monitors have several supported versions that use different runtime environments.

This document contains:

Find monitor version

A Synthetics monitor's version depends on what the latest monitor version was when that monitor was created. To view a monitor's version:

  1. Go to > (select a monitor).
  2. Select Settings > General.

The monitor's version number will be near the top of the page if it is not using the latest version. For example:

  • If the monitor was created when version 0.5.x or prior was the latest, then the previous version will be displayed as the monitor version.
  • If the monitor was created when the latest version was 0.6.x or higher, then a monitor version will not be displayed.

Monitor version runtime environments

A Synthetics monitor's runtime environment version defines the version of components and dependencies that are used to perform that monitor's checks. This version information applies to scripted browsers and API tests. It also applies to simple browser monitors, but that monitor type doesn't provide a scripting environment for use of third-party modules.

Choose a monitor version to see its details:

Version 0.6.x (latest)

Synthetics monitor version 0.6.x details:

The Synthetics runtime does not support the async/await syntax supported in Node 10.

Version 0.5.x

Synthetics monitor version 0.5.x details:

Version 0.4.x

Synthetics monitor version 0.4.x details:

Version 0.2.x

The only difference between monitor version 0.2.x and 0.4.x is that 0.4.x has network proxy settings enabled.

Synthetics monitor version 0.2.x details:

Version 0.1.0

Synthetics monitor version 0.1.0 details:

$env property reference

You can make your Synthetics scripted monitors more contextually aware by using the $env variable properties. These represent important information about the runtime environment in your script during execution.

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

console.log('running in ' + $env.LOCATION);
$env property Type Scripted browser Scripted API test


Unique ID (UUIDv4) identifying the running job

string [check icon] [check icon]


Unique ID (UUIDv4) identifying the running monitor

string [check icon] [check icon]


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

number [check icon] [check icon]


Type of monitor this job is running

string [check icon] [check icon]


API version this monitor is using

string [check icon] [check icon]


Location where this job is running. Examples:

  • aws-us-east-1
  • 123-my_location-81D (for private locations)
string [check icon] [check icon]


Host of the proxy that collects HTTP traffic metrics

string [check icon]


Port of the proxy that collects HTTP traffic metrics

number [check icon]

USER_DEFINED_VARIABLES (private locations)

A configurable set of variables specified by users.

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

string [check icon] [check icon]

Proxy properties

The following applies only to these versions:

  • API monitors: 0.4.0, 0.2.2, 0.2.1, 0.1.0
  • Scripted monitors: 0.1.0

In order to analyze and collect your HTTP traffic metrics, Synthetics must ensure the traffic passes through a conceptual funnel. Synthetics includes a software funnel component capable of analyzing the HTTP requests or responses and recording the information.

  • New Relic's scripted browser monitors (versions 0.4.x and lower) include a mechanism to do this analysis without needing an HTTP proxy, so you don't have to configure anything.
  • New Relic's API test (versions 0.4.x and lower) provides an $http object that is pre-configured to make the requests pass through the internal HTTP proxy. This allows you to write your test and not need to include any proxy settings.

If you want to use some other way to generate HTTP traffic while still collecting the HTTP traffic metrics, you can use $env.PROXY_HOST and $env.PROXY_PORT. To record traffic metrics, be sure to include these properties in your script.

For more help

Recommendations for learning more: