Log Sentry dev-inert status; explicit replay=0
When Sentry init runs but is disabled (local dev / CI), log a debug message so developers can see Sentry *would* send in production. Also explicitly set replaysSessionSampleRate/replaysOnErrorSampleRate to 0 in the client and mobile configs. Replay integration isn't installed, so this is documentation — it prevents future accidental enablement if an integration is ever added. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cc0f44258a
commit
4092f21475
4 changed files with 30 additions and 4 deletions
|
|
@ -3,12 +3,20 @@ import * as Sentry from "@sentry/react-native";
|
|||
const SENTRY_DSN = "https://af50ac7aea803216adbe21e9dd4b896b@o4509530546634752.ingest.de.sentry.io/4511209742532688";
|
||||
|
||||
export function initSentry() {
|
||||
const enabled = !__DEV__;
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
tracesSampleRate: __DEV__ ? 0 : 1.0,
|
||||
enabled: !__DEV__,
|
||||
enabled,
|
||||
sendDefaultPii: false,
|
||||
// Session Replay is not installed; document the intent explicitly.
|
||||
replaysSessionSampleRate: 0,
|
||||
replaysOnErrorSampleRate: 0,
|
||||
});
|
||||
|
||||
if (!enabled) {
|
||||
console.debug("[sentry] mobile init inert in dev; would send to Sentry in production");
|
||||
}
|
||||
}
|
||||
|
||||
export { Sentry };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue