4.1.0
Features
- Add
onNativeLogcallback to intercept and forward native SDK logs to JavaScript console (#1249)-
The callback receives native log events with
level,component, andmessageproperties -
Only works when
debug: trueis enabled inSentry.init -
Use
consoleSandboxinside the callback to prevent feedback loops with Sentry's console integrationimport * as Sentry from '@sentry/capacitor'; Sentry.init({ debug: true, onNativeLog: ({ level, component, message }) => { // Use consoleSandbox to avoid feedback loops Sentry.consoleSandbox(() => { console.log( `[Sentry Native] [${level.toUpperCase()}] [${component}] ${message}`, ); }); }, });
-
- Add
strictTraceContinuationandorgIdoptions for trace continuation validation (#1166)