Skip to content

getsentry/sentry-lynx

Repository files navigation

Sentry

Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us Check out our open positions

Sentry SDK for Lynx

The Sentry SDK for Lynx is a crash reporting and error monitoring solution specifically designed for Lynx applications. This SDK is currently under active development and has not been officially released yet. Stay tuned for the official release. In the meantime, you can follow the development progress and contribute to the project on GitHub.

🚧 Features (in-development)

  • Automatic JS Error Tracking (using @sentry/browser)
  • Automatic Native Crash Error Tracking (using sentry-cocoa & sentry-android under the hood)
  • Offline storage of events
  • On Device symbolication for JS (in Debug)

🚧 Installation and Usage (in-development)

To install the package and setup your project:

npm install --save @sentry/lynx-react

How to use it:

import * as Sentry from "@sentry/lynx-react";

Sentry.init({
  dsn: "__DSN__",
});

Sentry.setTag("myTag", "tag-value");
Sentry.setContext("myContext", {"key": "value"});
Sentry.addBreadcrumb({ message: "test" });

Sentry.captureMessage("Hello Sentry!");
Sentry.captureException(new Error("Sentry Test Error"));

To get readable errors and uploaded source maps add:

// 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',
    },
  },
});

Build Lynx for release with source maps:

# DEBUG='*' will ensure source maps are generated (and not deleted), so they can be uploaded to Sentry
DEBUG='*' rspeedy build

Resources

  • 🚧 Documentation
  • Discussions
  • Discord Chat
  • Stack Overflow
  • Code of Conduct
  • Twitter Follow