Open krystofwoldrich opened 1 year ago
Sentry Component Annotate Plugin
https://www.npmjs.com/package/@sentry/babel-plugin-component-annotate
Adds the source file name, we could utilize this in RN as well.
<div
data-sentry-component="MyAwesomeComponent"
data-sentry-source-file="myAwesomeComponent.jsx"
>
This is a really cool and awesome component!
</div>
https://docs.sentry.io/platforms/javascript/guides/react/features/component-names/#how-it-works
Description
Currently, we send components stack as reported by React:
We could explore
@babel/plugin-transform-react-jsx-source
to include components source code in the components stack.How does the plugin work: https://babeljs.io/docs/babel-plugin-transform-react-jsx-source
Example with the sources: