-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathinit.js
More file actions
23 lines (18 loc) · 624 Bytes
/
init.js
File metadata and controls
23 lines (18 loc) · 624 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import * as Sentry from '@sentry/browser';
import { createClient } from '@supabase/supabase-js';
window.Sentry = Sentry;
const supabaseClient = createClient('https://test.supabase.co', 'test-key');
Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
integrations: [Sentry.browserTracingIntegration(), Sentry.supabaseIntegration({ supabaseClient })],
tracesSampleRate: 1.0,
});
// Simulate generic RPC call
async function callGenericRpc() {
try {
await supabaseClient.rpc('my_custom_function', { param1: 'value1' });
} catch (error) {
Sentry.captureException(error);
}
}
callGenericRpc();