Using Agent APIs

The New Relic Roku agent is designed to monitor system and video events in Roku applications. It provides a comprehensive API for tracking various types of events, including system, video, error, ad, and custom events. This document outlines the API methods available for interacting with the New Relic Roku Agent.

API reference

If you want to...

Use this API

Initialize the agent.

NewRelic

Start system logging

NewRelicSystemStart

Begin video logging.

NewRelicVideoStart

Stop video logging.

NewRelicVideoStop

Process system log messages.

nrProcessMessage

Set a custom attribute for events.

nrSetCustomAttribute

Set a list of custom attributes.

nrSetCustomAttributeList

Send an APP_STARTED event.

nrAppStarted

Send a SCENE_LOADED event.

nrSceneLoaded

Send a custom event.

nrSendCustomEvent

Send a system event.

nrSendSystemEvent

Send a video event.

nrSendVideoEvent

Send an HTTP_REQUEST event.

nrSendHttpRequest

Send an HTTP_RESPONSE event.

nrSendHttpResponse

Enable HTTP events.

nrEnableHttpEvents

Disable HTTP events.

nrDisableHttpEvents

Set the harvest time for events and logs.

nrSetHarvestTime

Set the harvest time for events.

nrSetHarvestTimeEvents

Set the harvest time for logs.

nrSetHarvestTimeLogs

Set the harvest time for metrics.

nrSetHarvestTimeMetrics

Force immediate event and log harvest.

nrForceHarvest

Force immediate event harvest.

nrForceHarvestEvents

Force immediate log harvest.

nrForceHarvestLogs

Update the agent configuration.

nrUpdateConfig

Add a domain substitution pattern.

nrAddDomainSubstitution

Delete a domain substitution pattern.

nrDelDomainSubstitution

Record a log message.

nrSendLog

Record a gauge metric.

nrSendMetric

Record a count metric.

nrSendCountMetric

Record a summary metric.

nrSendSummaryMetric

Set a user identifier.

setUserId