Skip to content

Document autoInjectSentryLabel Babel plugin option #6113

@antonis

Description

@antonis

Once sentry-javascript-bundler-plugins#925 (#6098) lands, we need docs explaining:

  • The new autoInjectSentryLabel option in @sentry/babel-plugin-component-annotate
  • How it auto-injects sentry-label from static JSX text children at build time
  • The constraints: only static strings, 64-char cap, skips when sentry-label already exists
  • How to enable it (opt-in by default, autoInjectSentryLabel: true)
  • The textComponentNames option for custom text components
  • Interaction with runtime text extraction (Extract text children from touchable components for breadcrumb labels #6097): build-time injection takes priority since sentry-label is 0.1 Release #1 in the fallback chain

Docs locations to update:

  • docs/platforms/react-native/configuration/touchevents.mdx — mention build-time injection as an alternative to runtime extraction
  • docs/platforms/react-native/integrations/component-names.mdx — document the new plugin option alongside existing data-sentry-component docs
  • Possibly a new section or page depending on scope

Repo: getsentry/sentry-docs

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