Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Feature Idea: Exclude PubNub Long Polling Requests in Browser



Exclude PubNub Long Polling Requests in Browser

The NewRelic insights panel shows that our average page load times on the Browser tab sometimes spike to hundreds of seconds.

After doing some digging around, it looks like PubNub opens up a long polling HTTP connection for the duration of a users session. NewRelic adds this poll to our overall page load times. This really makes it hard to trust the data NewRelic produces for baseline metrics and error boundaries.

How do we ignore these long polls? Is there a strategy for ignoring PubNub requests? Or is there a recommended way to use the .end() or .finish() functions to tell NewRelic when the page finishes loading?

We are using the latest version of Browser PRO + SPA.


Hey @jcatania! We have our API available for this purpose:

So rather than end or finish, you can simply ignore =)


Thanks for the reply! It seems the .ignore() command kills all tracking for the current Browser Interaction. For us PubNub is a background process that is initialized after succesful login and follows the user around between SPA page views. That means that using the .ignore() command will keep us from receiving critical data about the page view where PubNub is initialized. How do we only exclude the PubNub transactions but include all of the other events happening within the route transition?

New Relic edit

  • I want this, too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


Hi @jcatania,

You are correct that the .ignore() call will disable tracking for the entire interaction event. We don’t have a way to exclude specific requests from an interaction at this time, but this is an excellent feature request. I’m going to flag it for our community team and have them add an FR poll to your post.


Hi, we are also experiencing load times being blown out by Pubnub long-polling. Can we use the .end() method to mark our page load as complete?


Hi @thomas49,

.end() will immediately terminate the interaction event that is currently in progress. It’s something you can do, certainly, but you’ll want to be aware that this will result in an arbitrary termination so it will likely make your interaction timing measurements less accurate.