Object as a Transaction Attribute rendered incorrectly

Hi Community,

Since the last APM’s update, which has added the new Error Analytics, we have noticed that the Transactions Attributes sent as objects are not being rendered correctly. However, in the deprecated Errors section, they are still rendered as before. Let me explain it better:

We set a custom attribute for all transactions as a JS object with extra information we need in case of a problem. In the deprecated Errors section, the UI renders the name of the attribute and then every property of the object is displayed with its value. However, in the new Error Analytics, the object is rendered as [object Object].

Here are some screenshots (I deleted sensitive data)

Error Analytics

Errors (deprecated)

We are using NodeJS agent v1.24.1. I think this is probably a bug in APM’s new frontend, what do you think? Is there anything, apart from manually sending every parameter, we can do?

Hi @fdreal - you’re right that the behavior in Error analytics differs from Traced errors. Could you provide a link to the application so we can look at this in more detail?

Hi! You can look at it here. It is just one example, we have more apps with this behavior.

Thanks for your help!

Thanks, that was very helpful. We’re going to look into this further as there are some complexities with nested data on the analytics side. If you did want to work around it in the meantime, the best option would be to flatten the object and send attributes with simple types.

Hey @fdreal - these complex attributes should now be displayed as a string as part of our recent improvements to this page, rather than not being decoded from the object form. However, we do still recommend flattening complex attributes for compatibility with Insights error events.

@alexis Great news! We have already flattened most of our apps’ attributes, but some of the legacy code still depends on this, so this is awesome.

1 Like