Skip to content

Enable autoInjectSentryLabel by default in React Native Metro config #6109

@antonis

Description

@antonis

Once #6098 lands in @sentry/babel-plugin-component-annotate with the autoInjectSentryLabel option (default false), we need to enable it by default in the React Native SDK's Metro config.

Change location: packages/core/src/js/tools/sentryBabelTransformerUtils.ts — where addSentryComponentAnnotatePlugin() passes options to the Babel plugin.

Steps:

  1. Bump @sentry/babel-plugin-component-annotate to the version that includes Auto-inject sentry-label from static JSX text children in Babel plugin #6098
  2. Pass autoInjectSentryLabel: true in the plugin options
  3. Optionally expose a config flag in withSentryConfig() to let users opt out

This is a small change but should be a separate PR from the Babel plugin work.

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions