Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
> make sure you follow our [migration guide](https://docs.sentry.io/platforms/react-native/migration/) first.
<!-- prettier-ignore-end -->

## Unreleased

### Features

- Add opt-in Metro transform that reports violated `invariant`/`assert`/`warning`/`console.assert` assertions as non-fatal Sentry events instead of crashing or being stripped ([#6592](https://github.com/getsentry/sentry-react-native/pull/6592))

Enable it by passing `captureAssertions: true` (or an options object) to `withSentryConfig` in your `metro.config.js`; omit it or set `captureAssertions: false` to disable. Hard preconditions (`invariant`/`assert`) still throw after reporting — you gain a readable, grouped event, not crash suppression.

## 8.23.0

### Changes
Expand Down
19 changes: 19 additions & 0 deletions packages/core/etc/sentry-react-native.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,19 @@ export const appStartIntegration: (input?: {
standalone?: boolean;
}) => AppStartIntegration;

// @public (undocumented)
export interface AssertionViolationOptions {
condition?: string;
error?: Error;
message?: string;
messageArgs?: unknown[];
once?: boolean;
pragma?: string;
rethrow?: boolean;
siteId?: string;
Comment thread
sentry-warden[bot] marked this conversation as resolved.
values?: Record<string, unknown>;
}

export { Breadcrumb }

// Warning: (ae-forgotten-export) The symbol "BreadcrumbsOptions" needs to be exported by the entry point index.d.ts
Expand All @@ -170,6 +183,9 @@ export { browserLinkedErrorsIntegration }
// @public
export const browserReplayIntegration: (options?: ReplayConfiguration) => Replay;

// @public
export function captureAssertionViolation(options?: AssertionViolationOptions): string;

export { captureEvent }

export { captureException }
Expand Down Expand Up @@ -223,6 +239,9 @@ export const deeplinkIntegration: (...args: any[]) => Integration & {
name: string;
};

// @public
export const DEFAULT_ASSERTION_MECHANISM = "assertion";

// @public
export const deviceContextIntegration: () => Integration;

Expand Down
Loading
Loading