Roku DataDog error tracker
npm install roku-data-dog


!GitHub last commit
- - -
A tool to track your Roku application errors.
ropm install roku-data-dog
`
The package should be stored in /components directory$3
- Create your RUM application in DataDog
- Create a try-catch block where you expect any error to occure#### Used with a SceneGraph project:
- Inside the
CATCH:
- Create dataDogTracker component
- Create and set the DataDog configuration
- Send the error to DataDog
- In the following example you can observe how to set up what was explained above:
`
dataDogTracker = CreateObject("roSGNode", "TrackerComponent")
dataDogConfigurationObject = {applicationID: "[application_id]", clientToken: "[application_token]"}
dataDogTracker.callFunc("setConfiguration", ConfigurationObject)
dataDogTracker.callFunc("sendError", error)
`#### Used with BrightScript project:
- Inside the xml file of your component you have to include the scripts for the following components:
`
`
- Inside the CATCH:
- Set the DataDog configuration
- Send the error to DataDog
- In the following example you can observe how to set up what was explained above:
`
dataDogConfigurationObject = {applicationID: "[application_id]", clientToken: "[application_token]"}
dataDogTrackerConfiguration = Configuration(dataDogConfigurationObject)
dataDogTracker = Tracker(dataDogTrackerConfiguration)
dataDogTracker.sendError(error)
`###### Keep in mind that in the examples, the methods are called without any prefixes, so if you install the package with prefixes, use them for the package methods.
##### The following fields can be set inside the DataDog configuration:
| Field | Type | Default Value |
| :------------ | :------------ | :------------ |
| applicationID | STRING | "" |
| clientToken | STRING | "" |
| site | STRING | "" |
| service | STRING | "" |
| sampleRate | INTEGER | 100 |
| trackInteractions | BOOLEAN | TRUE |
How to use the Test Project
- Download test-project file to your machine
- Note that in the scene component there are 2 ways of the DataDog tracker implementation:
- BrightScript implementation (currently used)
- SceneGraph implementation (commented inside the code)
- Replace [application_id] with your application id
- Replace [application_token]` with your application token- date
- country
- application ID
- application version
- device model
- device OS version
- message
- backtrace