Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Rails Support
      • Working with Bundler
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Java Advanced Topics
      • Working with Spring Boot
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Add-ons
  • All Add-ons
  • Raygun Real User Monitoring
Raygun Real User Monitoring

This add-on is operated by Raygun

User-centric front-end performance monitoring.

Raygun Real User Monitoring

Last updated September 03, 2020

Table of Contents

  • Provisioning the add-on
  • Configuring your application
  • Using Real User Monitoring
  • Migrating between plans
  • Removing the add-on
  • Support

Raygun Real User Monitoring (RUM) provides insights into the front-end performance of your application, enabling you to understand how performance is impacting the user experience.

Real User Monitoring enables you to:

  • Identify and resolve performance issues
  • Get instance-level insights into every user session
  • Measure the impact of performance optimizations
  • See how users are interacting with your application

Provisioning the add-on

Raygun Real User Monitoring can be attached to a Heroku application via the CLI:

A list of all plans available can be found here.

$ heroku addons:create raygun-rum:rum-free --app your-app-name
Created raygun-rum-kiwi-9001

After you provision Raygun Real User Monitoring, the RAYGUN_RUM_APIKEY config var is available in your app’s configuration. It contains the API key used to send data to Raygun. You can confirm this via the heroku config:get command:

$ heroku config:get RAYGUN_RUM_APIKEY --app your-app-name
your_api_key_here

Configuring your application

After you install Raygun Real User Monitoring, your application will need to be configured to fully integrate with the add-on.

STEP 1 - Install the client library

Using our CDN:

Add this snippet to your markup, before the closing <head/> tag:

<script type="text/javascript">
  !function(a,b,c,d,e,f,g,h){a.RaygunObject=e,a[e]=a[e]||function(){
  (a[e].o=a[e].o||[]).push(arguments)},f=b.createElement(c),g=b.getElementsByTagName(c)[0],
  f.async=1,f.src=d,g.parentNode.insertBefore(f,g),h=a.onerror,a.onerror=function(b,c,d,f,g){
  h&&h(b,c,d,f,g),g||(g=new Error(b)),a[e].q=a[e].q||[],a[e].q.push({
  e:g})}}(window,document,"script","//cdn.raygun.io/raygun4js/raygun.min.js","rg4js");
</script>

Or manually:

Download the production script (minified), the development script (full source) or see here for installing with npm

STEP 2 - Enable Real User Monitoring

Add the following lines of JS code just before the closing body tag in your site or app:

<script type="text/javascript">
  rg4js('apiKey', 'RAYGUN_RUM_APIKEY'); // Enter your RAYGUN_RUM_APIKEY here.
  rg4js('enablePulse', true);
</script>

STEP 3 - Browse your application

We recommend browsing to your application right now to test that everything is wired up correctly. Raygun will begin collecting and reporting data within a few minutes.

Additional options:

Single Page Applications: You can track SPA view changes with thetrackEvent function:

rg4js('trackEvent', { type: 'pageView', path: 'url/goes/here' });

For more examples on how to use the trackEvent function, see the Single Page Application documentation.

The language guides in the Raygun documentation provide detailed information about installation, configuration, and additional features.

Using Real User Monitoring

For more information on getting the most out of using Raygun, see our Real User Monitoring documentation

You can access the application via the CLI:

$ heroku addons:open raygun-rum-kiwi-9001 --app your-app-name
Opening raygun-rum-kiwi-9001

Alternatively, visit the Heroku Dashboard and select your application. Once here, you can navigate to Raygun Real User Monitoring from the Add-ons menu.

Migrating between plans

Use the heroku addons:upgrade command to migrate to a new plan.

$ heroku addons:upgrade raygun-rum:business --app your-app-name
--> Changing raygun-rum-kiwi-9001 on your-app-name from raygun-rum:rum-free to raygun-rum:rum-business
       Your plan changes have been successfully applied

Removing the add-on

You can remove Raygun Real User Monitoring via the CLI:

This will destroy all associated data and cannot be undone!

$ heroku addons:destroy raygun-rum-laser-kiwi-9001 --app your-app-name
Destroying raygun-rum-kiwi-9001 on your-app-name... done

Support

All Raygun Real User Monitoring support and runtime issues should be submitted via one of the Heroku Support channels. Any non-support related issues or product feedback is welcome at the Raygun forums.

Keep reading

  • All Add-ons

Feedback

Log in to submit feedback.

Ziggeo Real Email

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences