Skip to content

docs(react-native): document release/dist env vars#124

Open
zerone0x wants to merge 1 commit intogetsentry:mainfrom
zerone0x:fix/react-native-release-dist-env-docs
Open

docs(react-native): document release/dist env vars#124
zerone0x wants to merge 1 commit intogetsentry:mainfrom
zerone0x:fix/react-native-release-dist-env-docs

Conversation

@zerone0x
Copy link
Copy Markdown

@zerone0x zerone0x commented May 4, 2026

Summary

  • document React Native SENTRY_RELEASE and SENTRY_DIST environment variables
  • clarify that these values are read at native build time by the Sentry Metro / Expo config plugins
  • add a short .env / CI example

Fixes #123

Tests

  • git diff --check
  • scripts/build-skill-tree.sh --check

Co-Authored-By: GPT-5.5 <noreply@nousresearch.com>
Comment on lines +674 to +676
```

`SENTRY_RELEASE` and `SENTRY_DIST` are read during the native build. They do not need to be bundled into the app at runtime.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation for SENTRY_RELEASE and SENTRY_DIST is contradictory, stating they are only for native build time while also being listed as runtime SDK initialization options.
Severity: MEDIUM

Suggested Fix

Revert the new documentation to align with the previous version and other Sentry SDKs. The text should clarify that SENTRY_RELEASE and SENTRY_DIST are used as fallbacks for the options.release and options.dist SDK initialization options, and must be available during the Metro bundling process to be included in the final app bundle.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: skills/sentry-react-native-sdk/SKILL.md#L674-L676

Potential issue: The documentation added at lines 661-676 incorrectly states that the
`SENTRY_RELEASE` and `SENTRY_DIST` environment variables are only used at native build
time and "do not need to be bundled into the app at runtime." This contradicts other
sections of the same document (lines 554-555) and the official Sentry React Native
documentation, which clarify these are read automatically during SDK initialization.
This misleading guidance will cause AI models to advise developers against setting these
variables during the bundling process, resulting in Sentry events missing release and
distribution information, which will break source map processing.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[skill-drift] sentry-react-native-sdk: SENTRY_RELEASE and SENTRY_DIST env var support missing from skill

1 participant