Skip to content

Commit 3a2c999

Browse files
alwxandreiborza
authored andcommitted
React Native Supabase integration documentation
1 parent 7f962ca commit 3a2c999

File tree

1 file changed

+28
-0
lines changed
  • docs/platforms/react-native/integrations

1 file changed

+28
-0
lines changed

docs/platforms/react-native/integrations/plugin.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,31 @@ We'll use `bundles/bundle1.js` as an example full path to your file for the tabl
9999
| `RewriteFrames()` | `app:///bundle1.js` | The default behavior is to replace the absolute path, minus the filename, and add the default prefix (`app:///`). |
100100
| `RewriteFrames({root: '/bundles'})` | `app:///bundle1.js` | The `root` is defined as `/bundles`. Only that part is trimmed from the beginning of the path. |
101101
| `RewriteFrames({iteratee: () => {} })` | `app:///bundle.js` | The number at the end of a bundle can be a file hash. This is common in Expo apps. You can remove it in the `iteratee` callback. |
102+
103+
### Supabase
104+
105+
_Import name: `Sentry.supabaseIntegration`_
106+
107+
The `supabaseIntegration` adds instrumentation for the Supabase client to capture spans for both authentication and database operations.
108+
109+
You need to have both the Sentry React Native SDK and the Supabase library installed. For Supabase installation instructions, refer to the [Supabase JavaScript documentation](https://supabase.com/docs/reference/javascript/introduction).
110+
111+
#### Configuration
112+
113+
This is the preferred method for most use cases. and follows Sentry's standard integration pattern.
114+
115+
```javascript
116+
import * as Sentry from "@sentry/react-native";
117+
import { createClient } from '@supabase/supabase-js';
118+
119+
const supabaseClient = createClient('YOUR_SUPABASE_URL', 'YOUR_SUPABASE_KEY');
120+
121+
Sentry.init({
122+
dsn: "___PUBLIC_DSN___",
123+
integrations: [
124+
Sentry.supabaseIntegration({ supabaseClient })
125+
],
126+
});
127+
```
128+
129+
For more information, please refer to [the Supabase integration documentation for the JavaScript SDK](/platforms/javascript/configuration/integrations/supabase/).

0 commit comments

Comments
 (0)