|
| 1 | +<p align="center"> |
| 2 | + <a href="https://sentry.io" target="_blank" align="center"> |
| 3 | + <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280"> |
| 4 | + </a> |
| 5 | + <br /> |
| 6 | +</p> |
| 7 | + |
| 8 | + |
| 9 | +=========== |
| 10 | + |
| 11 | +<p align="center"> |
| 12 | + <a href="https://sentry.io" target="_blank" align="center"> |
| 13 | + <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280"> |
| 14 | + </a> |
| 15 | + <br /> |
| 16 | +</p> |
| 17 | + |
| 18 | +Sentry integration for `supabase` package |
| 19 | +=========== |
| 20 | + |
| 21 | +| package | build | pub | likes | popularity | pub points | |
| 22 | +|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------| ------- | |
| 23 | +| sentry_supabase | [](https://github.com/getsentry/sentry-dart/actions?query=workflow%3Asentry-supabase) | [](https://pub.dev/packages/sentry_supabase) | [](https://pub.dev/packages/sentry_supabase/score) | [](https://pub.dev/packages/sentry_supabase/score) | [](https://pub.dev/packages/sentry_supabase/score) |
| 24 | + |
| 25 | +Integration for [`supabase`](https://pub.dev/packages/supabase) package. |
| 26 | + |
| 27 | +#### Usage |
| 28 | + |
| 29 | +- Sign up for a Sentry.io account and get a DSN at https://sentry.io. |
| 30 | + |
| 31 | +- Follow the installing instructions on [pub.dev](https://pub.dev/packages/sentry/install). |
| 32 | + |
| 33 | +- Initialize the Sentry SDK using the DSN issued by Sentry.io. |
| 34 | + |
| 35 | +- Call... |
| 36 | + |
| 37 | +```dart |
| 38 | +import 'package:supabase_flutter/supabase_flutter.dart'; |
| 39 | +import 'package:sentry_supabase/sentry_supabase.dart'; |
| 40 | +
|
| 41 | +// Create a [SentrySupabaseClient] and pass it to Supabase during initialization. |
| 42 | +
|
| 43 | +final sentrySupabaseClient = SentrySupabaseClient(); |
| 44 | +await Supabase.initialize( |
| 45 | + url: '<YOUR_SUPABASE_URL>', |
| 46 | + anonKey: '<YOUR_SUPABASE_ANON_KEY>', |
| 47 | + httpClient: sentrySupabaseClient, |
| 48 | +); |
| 49 | +
|
| 50 | +// Now all [Supabase] operations and queries will |
| 51 | +// be instrumented with Sentry breadcrumbs, traces and errors. |
| 52 | +
|
| 53 | +final issues = await Supabase.instance.client |
| 54 | + .from('issues') |
| 55 | + .select(); |
| 56 | +``` |
| 57 | + |
| 58 | +#### Resources |
| 59 | + |
| 60 | +* [](https://docs.sentry.io/platforms/flutter/) |
| 61 | +* [](https://docs.sentry.io/platforms/dart/) |
| 62 | +* [](https://github.com/getsentry/sentry-dart/discussions) |
| 63 | +* [](https://discord.gg/PXa5Apfe7K) |
| 64 | +* [](https://stackoverflow.com/questions/tagged/sentry) |
| 65 | +* [](https://twitter.com/intent/follow?screen_name=getsentry) |
0 commit comments