- Update the SDK name to
sentry.javascript.lynx.react
(#26)
Initial preview release of the Sentry Lynx SDK. This release focuses on error monitoring of the background JavaScript thread of Lynx React mobile applications.
To get started, install the @sentry/lynx-react
package in your project.
Then add the Sentry Lynx Plugin to upload source maps and see readable stacktraces in Sentry.
// App.tsx
import * as Sentry from '@sentry/lynx-react';
Sentry.init({
dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0',
});
// lynx.config.ts
import { defineConfig } from '@lynx-js/rspeedy';
import { pluginSentryLynx } from '@sentry/lynx-react/plugin';
export default defineConfig({
plugins: [
// ... other plugins
pluginSentryLynx({
org: 'your-sentry-organization-slug',
project: 'your-sentry-project-slug',
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
],
output: {
sourceMap: {
js: 'source-map',
},
},
});
To build the app with source maps, run:
# DEBUG='*' will ensure source maps are generated (and not deleted), so they can be uploaded to Sentry
DEBUG='*' rspeedy build
- Automatic upload of background thread source maps when building the app (#8)
- Automatic report caught unhandled errors in the background thread to Sentry (#18)
- Local symbolication of background thread stacktraces in debug mode (#24)
- API for manually reporting errors with
Sentry.captureException
(#21)
If you encounter any bugs or have feature requests, please:
- Open an issue at https://github.com/getsentry/sentry-lynx/issues
- Join the discussion on Sentry Discord