You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have a minor issue with Axiom-js. The fact that data ingesting uses basic JSON.stringify to convert data to JSON means it fails in cases where it runs into a circular JSON situation. This situation is not something super rare, exceptions or request logging often contains circular structures.
One way to deal with it is to flatten the JSON before ingesting. Would it be possible to add an option to flatten the data if needed? I don't think it would cause any issue if it flattened it by default, but I would have to check the possible performance change. The best option, to me, seems to be having a flattening option in the IngestOptions next to the timestamp options and the CSV delimiter here.
I would be willing to create a PR but I reckon the JSON serialization is on multiple places and discussing it with someone would probably take a lot more time than someone changing it themselves.
Thank you.
The text was updated successfully, but these errors were encountered:
hi @prokopec-simon. sorry for my late reply. The json serialization is in two places, webVitals and logger, I believe we don't need to do that for webVitals. would be happy to review your PR on the logger json serialization.
Hi,
I have a minor issue with Axiom-js. The fact that data ingesting uses basic JSON.stringify to convert data to JSON means it fails in cases where it runs into a circular JSON situation. This situation is not something super rare, exceptions or request logging often contains circular structures.
One way to deal with it is to flatten the JSON before ingesting. Would it be possible to add an option to flatten the data if needed? I don't think it would cause any issue if it flattened it by default, but I would have to check the possible performance change. The best option, to me, seems to be having a flattening option in the IngestOptions next to the timestamp options and the CSV delimiter here.
To replicate the issue:
I would be willing to create a PR but I reckon the JSON serialization is on multiple places and discussing it with someone would probably take a lot more time than someone changing it themselves.
Thank you.
The text was updated successfully, but these errors were encountered: