Integrates Single Page Apps with NewRelic's Real User Monitoring
Make sure you have bower. Also see http://bower.io/
npm install -g bower
then run:
bower install newrelic-timing
For Rails, consider using bower-rails gem or https://rails-assets.org/ and add the following to your Gemfile:
source 'https://rails-assets.org'
gem "rails-assets-newrelic-timing"
To install add both newrelic-timing.js
and newrelic-timing-angular.js
scripts to your html, then add newrelic-timing
to your angular module dependencies.
angular.module('your.application', [
// other dependencies
'newrelic-timing'
]);
Supports both ui-router and ngRoute.
There are no configuration options in newrelic-timling. You only need to make sure that the New Relic javascript is loaded correctly (through injection or by copy-pasting the snippet). Steps explaining how to add the New Relic javascript to your website can be found on their website.
Once configured correctly, newrelic-timing will use the API exposed by New Relic to send timing information to the New Relic server. These timings will show up as APM Transactions in the New Relic Browser dashboards.
newrelic-timing.js
exposeswindow.newrelicTiming
that does all the work.newrelic-timing-angular.js
hooksnewrelicTiming
into angular router state changes.
Please take a look at newrelic-timing-angular.js
as an example of how to integrate this into your framework.
- added support for ui-router
- fixed a silly typo in the angular plugin that prevented it from working
- add specs
- fix minor bugs and internal refactorings
- Gracefully handle NREUM not being loaded
- newrelicTiming.sendNRBeacon() now takes optional fragment as a parameter
- angular version uses $location.path() for fragment name
Initial Release