---
title: NewRelic
source: https://docs.newrelic.com/docs/streaming-video-&-ads/installation/roku/agent-api/initialization/newrelic
---

## Syntax

```js
NewRelic(account as String, apikey as String, region = "US" as String, activeLogs = false as Boolean) as Object
```

## Description

Build a New Relic Agent object.

## Arguments

| Arguments  | Description                                                 |
| ---------- | ----------------------------------------------------------- |
| account    | New Relic account number.                                   |
| apikey     | API key.                                                    |
| region     | (optional) New Relic API region, EU, JP, or US. Default US. |
| activeLogs | (optional) Activate logs or not. Default False.             |

## Return

New Relic Agent object.

## Example

```js
	sub Main(aa as Object)
		screen = CreateObject("roSGScreen")
		m.port = CreateObject("roMessagePort")
		screen.setMessagePort(m.port)
		scene = screen.CreateScene("VideoScene")
		screen.show()
	
		m.nr = NewRelic("ACCOUNT ID", "API KEY")
```
