The New Relic Roku Agent tracks the behaviour of a Roku App. It contains two parts, one to monitor general system level events and one to monitor video related events, for apps that use a video player).
Internally, it uses the Insights API to send events using the REST interface. It sends two types of events: RokuSystem for system events and RokuVideo for video events. After the agent has sent some data it will be accessible in Insights with a simple NRQL request like:
SELECT * FROM RokuSystem, RokuVideo
Sending both system events and video events requires an Insights Pro subscription. Insights Free accounts permit only one event type per API key. If you are using an Insights Free account, you can enable only one type of Roku event capture at a time (system or video).
To initialize the agent you need an ACCOUNT ID and an API KEY.
The ACCOUNT ID indicates the New Relic account to which you would like to send the Roku data. For example, https://insights.newrelic.com/accounts/xxx. Where “xxx” is the Account ID.
To register the API Key, follow the instructions found here.
- Download the Roku Video Agent and unzip it. Inside the package you will find the following file structure:
components/NewRelicAgent/ NRAgent.brs NRAgent.xml NRTask.brs NRTask.xml source/ NewRelicAgent.brs
- Open your Roku app project’s directory and copy the “NewRelicAgent” folder to “components” and "NewRelicAgent.brs" file to “source”.
To enable automatic event capture perform the following steps which are detailed below.
NewRelicfrom Main subroutine and store the returned object.
- Right after that, call
nrAppStarted(optional but recommended).
NewRelicVideoStartto start capturing events for system and video (both optional).
- Inside the main wait loop, call
nrProcessMessage(only mandatory to capture system events, otherwise not necessary).
For examples, go to Github here (https://github.com/newrelic/video-agent-roku).
This Roku agent is supported by the developers here in this community thread, or alternatively you can ask questions in the Github Issues page (https://github.com/newrelic/video-agent-roku/issues). If you can fix the issue yourself, please do submit a pull request.