npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

roku-data-dog

v1.6.0

Published

Roku DataDog error tracker

Downloads

16

Readme

Roku DataDog error tracker

npm version monthly downloads license GitHub last commit


A tool to track your Roku application errors.

Requirements

Installation

Use following command to get the package to your application

ropm install roku-data-dog

The package should be stored in /components directory

How to use DataDogTracker:

  • 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:
<script type="text/brightscript" uri="pkg:/[path_to_project]/dataDogTracker/viewSample.brs" />
<script type="text/brightscript" uri="pkg:/[path_to_project]/dataDogTracker/errorSample.brs" />
<script type="text/brightscript" uri="pkg:/[path_to_project]/dataDogTracker/dataDogConfig.brs" />
<script type="text/brightscript" uri="pkg:/[path_to_project]/dataDogTracker/dataDogConfiguration.brs" />
<script type="text/brightscript" uri="pkg:/[path_to_project]/dataDogTracker/dataDogTracker.brs" />
  • 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
  • Archive the project and run it on your device
  • Look in DataDog RUM application to see the view with one error in it

Data recieved by DataDog RUM application

Currently the application is sending a view event and one error event, both sharing same ids.

What you can see inside the error

  • date
  • country
  • application ID
  • application version
  • device model
  • device OS version
  • message
  • backtrace

License

This library is licensed under the Apache 2.0 License. See the LICENSE for details.