designcourse
designcourse copied to clipboard
stack trace/source mapping for custom action
Hey! I just got sourcemapping set up for my RUM app and its working great for errors. Is there a way to do the same thing for custom actions? i.e have an unminified stack trace visible in the datadog console for actions tracked via datadogRum.addAction
Hello 👋
Unfortunately, only errors collected by RUM and logs of level error
collected by browser-logs can be unminified using source maps.
Check more on the official documentation.
thank you for confirming, are there any workarounds i could try using custom attributes or something similar? If not whats the recommended way of dealing with events with the same name across many different files/locations?
Hello @b3nb5n, Could you clarify what you're trying to acheive? Basically:
yeah. basically we're using addAction all over our app to log custom actions, and I'm trying to get a consistent way of finding the exact call site in the source based on the information available on the event in the web console. The problem is that some of our events have names that are used in many different places throughout the app, so running a global search on the codebase shows multiple results. Our current solution is to just include the file name and line number in the event name, but thats too easy to mess up during refactoring or forget all together. Is there an easier/better way to uniquely identify were the actions are actually coming from?
Hello @b3nb5n ,
To identify where the actions are actually coming from, you can filter them using view.name
.
Otherwise, if this does not work for you, could you clarify a specific step-by-step use case where the view.name does not lead to the correct location? Plus don't hesitate to contact our Support Team for configuration helps.
Hi, if there are multiple events in the same view with the same name it could still be ambiguous where the event came from.
Hi,
Regarding this:
it could still be ambiguous where the event came from
Could you give us an example (a code piece or implementation steps) of using addAction()
which lead to this? Maybe we can offer more help from there.