Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack trace/source mapping for custom action #2703

Open
b3nb5n opened this issue Apr 11, 2024 · 7 comments
Open

stack trace/source mapping for custom action #2703

b3nb5n opened this issue Apr 11, 2024 · 7 comments

Comments

@b3nb5n
Copy link

b3nb5n commented Apr 11, 2024

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

@N-Boutaib
Copy link
Contributor

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.

@b3nb5n
Copy link
Author

b3nb5n commented Apr 15, 2024

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?

@amortemousque
Copy link
Contributor

Hello @b3nb5n,
Could you clarify what you're trying to acheive?
Basically:

  • if you want to manually collect errors with unminified stack trace you can use addError
  • for collecting your own view performance timings, you can use the addTiming
  • otherwise you can use addAction

@b3nb5n
Copy link
Author

b3nb5n commented Apr 17, 2024

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?

@cy-moi
Copy link
Contributor

cy-moi commented Apr 22, 2024

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.

@b3nb5n
Copy link
Author

b3nb5n commented Apr 23, 2024

Hi, if there are multiple events in the same view with the same name it could still be ambiguous where the event came from.

@cy-moi
Copy link
Contributor

cy-moi commented Apr 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants