Viewing custom attributes in JS Errors

I’ve enabled custom attributes for the browser API:

  newrelic.setCustomAttribute('username', name);

I’m able to query the attributes from within insights which is great. I’d like to see the attributes in context with any JS errors that have occurred or even within the session traces but I’m not finding anything.

Are we able to view such custom attributes within browser or is this for insights only?

1 Like

Hi @mcantrell - it looks like you had a ticket on this as well. The response may help others, and it was this:

“Custom attributes are specific to Insights, and unfortunately there’s no way to link them directly to JS errors or session traces. However, you can use the newrelic.addToTrace(obj) API call alongside that to add a an object to the session trace at the same time. Details can be found in our docs

… and we submitted a feature request asking for a link between the custom attribute and the errors page. :slight_smile:


FWIW, this would be a helpful feature for my team as well.

Hi @abutterworth,

Custom attributes for JS error events became available beginning with Browser agent v 1118. The custom attribute will be available on your JavaScript error events, and you can filter by these attributes in the JavaScript error view of the UI. Here are a couple of resources that I think you’ll find helpful:

1 Like

Hi there, what I’m hoping for is a way to see all the custom attributes set on an error on the error detail page. I see that I can filter errors on the list view, but for a given error when I click on it I can’t see the custom attributes it contains. Does that make sense? Maybe I’m missing something?

1 Like


Ah, apologies for misunderstanding. The custom attribute data isn’t yet viewable within the error interface, but that’s certainly a feature request we can submit for you for consideration in future updates to that view!

1 Like

I’m also interested in the ability to view custom attributes when looking at individual error instances.

@Matthew.Reiter I have made note of your interest in this feature as well. Thanks :slight_smile: