From 010d26715cef7b446f8329b5e13c286373ab879e Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Wed, 18 Mar 2026 10:16:31 +0100 Subject: [PATCH 1/9] docs(sdk): Rewrite Review and CI spec for readability Replace rigid Rule/Enforcement/Per-SDK override template with natural prose. Merge reviewers, SLAs, and feedback conventions into one code review section. Remove enforcement boilerplate and StatusBadge components. Move commit message validation to recommended CI checks. Promote spec status to stable. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../getting-started/standards/review-ci.mdx | 174 +++++------------- 1 file changed, 41 insertions(+), 133 deletions(-) diff --git a/develop-docs/sdk/getting-started/standards/review-ci.mdx b/develop-docs/sdk/getting-started/standards/review-ci.mdx index a89c35f64929f..70c0120d93014 100644 --- a/develop-docs/sdk/getting-started/standards/review-ci.mdx +++ b/develop-docs/sdk/getting-started/standards/review-ci.mdx @@ -2,7 +2,7 @@ title: Review and CI spec_id: sdk/getting-started/standards/review-ci spec_version: 1.1.0 -spec_status: candidate +spec_status: stable spec_platforms: - all spec_changelog: @@ -19,181 +19,89 @@ sidebar_order: 4 - +These standards cover how code gets reviewed and what CI must check before anything merges or ships. The goal: catch problems early, keep reviews useful, and make sure releases are safe. -## Required Reviewers + -#### Rule +## Code review -Every PR **REQUIRES** at least one approving review. -@sdk-seniors review **REQUIRED** for: +### Who needs to review -- Public API ([Public API change approval gate](/sdk/getting-started/standards/api-architecture#public-api-change-approval-gate)) -- New dependencies ([Dependency management](/sdk/getting-started/standards/code-quality#dependency-management)) -- Security-sensitive code ([Security practices](/sdk/getting-started/standards/code-quality#security-practices)) -- Schema changes -- Frameworks/architectural shifts. - External contributor PRs **REQUIRE** review from someone with area context. - -#### Enforcement - -- GitHub branch protection -- CODEOWNERS file - -#### Suggested skill(s) - -- [`sentry-skills:code-review`](https://github.com/getsentry/skills#available-skills) - -#### Per-SDK override - - CODEOWNERS and reviewer count are team-specific. - - - ---- - - - -## Review SLAs - -#### Rule - -Internal PRs: first review within 1 business day. -External PRs: first response within 2 business days. - -"First review" means substantive feedback, not just a reaction. - -If an area has only a single reviewer or if that reviewer lacks capacity, the reviewer **MUST** proactively find coverage (another reviewer or AI assist). The PR author **SHOULD** also help identify an appropriate reviewer to avoid blocking the PR. - -#### Enforcement - -- Dashboard tracking -- Periodic reporting - -#### Per-SDK override - - Teams can set stricter SLAs. Baseline is universal. - - - ---- - - - -## Review Feedback Conventions +Every PR **REQUIRES** at least one approving review. Some changes need review from an [SDK Senior Engineer](https://github.com/orgs/getsentry/teams/sdk-seniors): -#### Rule - -LOGAF scale: +- [Public API changes](/sdk/getting-started/standards/api-architecture#public-api-changes) +- [New dependencies](/sdk/getting-started/standards/code-quality#dependencies) +- [Security-sensitive code](/sdk/getting-started/standards/code-quality#security) +- Schema changes +- Frameworks or architectural shifts -- `h:` (high) — must fix (bugs, security, breakage, data loss) -- `m:` (medium) — should fix (design, missing tests, clarity) -- `l:` (low) — optional nit (style, minor suggestions) +PRs from external contributors need review from someone with context on the affected area. -Comments without a prefix are treated as `m:` (medium). A PR **MUST NOT** be merged if it has any unresolved `h:` comments. +### Turnaround time -#### Enforcement +Internal PRs should get a first substantive review within 1 business day. External PRs should get a first response within 2 business days. "First review" means real feedback, not just a reaction. -- Convention +If you're the sole reviewer for an area and don't have capacity, proactively find coverage — another reviewer or AI assist. PR authors should also help identify an appropriate reviewer to avoid blocking. -#### Suggested skill(s) +### Feedback conventions -- [`sentry-skills:iterate-pr`](https://github.com/getsentry/skills#available-skills) — triages by LOGAF level. -- [`sentry-skills:code-review`](https://github.com/getsentry/skills#available-skills) — uses LOGAF in feedback. +Use the LOGAF scale to signal the weight of your feedback: -#### Per-SDK override +- **`h:`** (high) — must fix: bugs, security issues, breakage, data loss +- **`m:`** (medium) — should fix: design, missing tests, clarity +- **`l:`** (low) — optional nit: style, minor suggestions - +Comments without a prefix are treated as medium. A PR **MUST NOT** merge with unresolved `h:` comments. --- - + -## Required CI Checks Baseline +## CI checks -#### Rule - -Every SDK repo **MUST** have as required status checks: +Every SDK repo **MUST** have these as required status checks: 1. Build -2. Lint ([Linting and formatting in CI](/sdk/getting-started/standards/code-quality#linting-and-formatting-in-ci)) -3. Type check where applicable ([Type checking in CI](/sdk/getting-started/standards/code-quality#type-checking-in-ci)) +2. Lint +3. Type check (where applicable) 4. Tests -5. Commit message structure and content ([Commit message structure and content](/sdk/getting-started/standards/code-submission#commit-message-structure-and-content)). - -Optional/**RECOMMENDED**: -- Size/Performance Check ([SDK size and performance budgets](/sdk/getting-started/standards/code-quality#sdk-size-and-performance-budgets)) -- API Snapshot ([Public API change approval gate](/sdk/getting-started/standards/api-architecture#public-api-change-approval-gate)) -- Changelog Check ([Changelog entry](/sdk/getting-started/standards/code-submission#changelog-entry)) -- Secret Scanning ([Security practices](/sdk/getting-started/standards/code-quality#security-practices)). +These are also recommended but not yet required everywhere: -#### Enforcement +- Commit message validation +- Size and performance checks +- API snapshot diffs +- Changelog validation +- Secret scanning -- GitHub branch protection + -#### Suggested skill(s) +--- -- [`sentry-skills:claude-settings-audit`](https://github.com/getsentry/skills#available-skills) + -#### Per-SDK override +## Warden - Additional checks per SDK. Baseline is universal. +SDK repos **SHOULD** have [Warden](https://warden.sentry.dev/) configured in CI via the Warden GitHub Action. Warden runs AI-powered skills against PR diffs to enforce SDK-specific conventions that static linters can't express. Which skills are active varies by SDK. --- - + -## Release Gating Criteria - -#### Rule +## Release gating A release **MUST NOT** ship if: - Any required CI check fails -- Any `h:` comment remains unresolved on merged PRs since last release +- Any `h:` review comment remains unresolved on merged PRs since the last release - The changelog is empty for user-facing changes - Any known regression remains unresolved -#### Enforcement - -- Release tooling checks -- Human judgment for regressions - -See also: [Setting up release infrastructure playbook](/sdk/getting-started/playbooks/setup/setting-up-release-infrastructure) for initial release setup. - -#### Per-SDK override - - Additional gates per SDK possible (e.g., beta/rc periods). - - - ---- - - - -## Warden - -#### Rule - -SDK repos **SHOULD** have [Warden](https://warden.sentry.dev/) configured in CI via the Warden GitHub Action. Warden runs AI-powered skills against PR diffs to enforce SDK-specific conventions that static linters cannot express. - -#### Enforcement - -- GitHub Actions (Warden GitHub Action) -- Human review for follow-up on findings - -#### Suggested skill(s) - -- [`sentry-skills:warden-lint-judge`](https://github.com/getsentry/skills#available-skills) — converts findings into permanent lint rules. - -#### Per-SDK override - - Which Warden skills are active varies per SDK. +See [Setting up release infrastructure](/sdk/getting-started/playbooks/setup/setting-up-release-infrastructure) for initial release setup. From cb119c33f31852e91216ef6b5a3ab55fed3e3c7b Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Wed, 18 Mar 2026 11:05:43 +0100 Subject: [PATCH 2/9] docs(sdk): Fix anchor references to review-ci Update playbook links to match new section IDs after spec rewrite. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../playbooks/development/handling-a-regression.mdx | 2 +- .../development/handling-external-contributor-pr.mdx | 8 ++++---- .../playbooks/development/opening-a-pr.mdx | 4 ++-- .../playbooks/development/reviewing-a-pr.mdx | 10 +++++----- .../development/reviewing-ai-generated-code.mdx | 4 ++-- .../playbooks/sdk-lifecycle/cutting-a-release.mdx | 4 ++-- .../playbooks/setup/setting-up-new-sdk-repo.mdx | 4 ++-- .../setup/setting-up-release-infrastructure.mdx | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/develop-docs/sdk/getting-started/playbooks/development/handling-a-regression.mdx b/develop-docs/sdk/getting-started/playbooks/development/handling-a-regression.mdx index 08948bf8c0021..094336a79d9d9 100644 --- a/develop-docs/sdk/getting-started/playbooks/development/handling-a-regression.mdx +++ b/develop-docs/sdk/getting-started/playbooks/development/handling-a-regression.mdx @@ -72,7 +72,7 @@ This helps identify gaps in testing, review processes, or monitoring that can be - [Post-release monitoring](/sdk/getting-started/standards/coordination-maintenance#post-release-monitoring) — monitoring that detects regressions - [Rollback procedures](/sdk/getting-started/standards/coordination-maintenance#rollback-procedures) — emergency rollback process -- [Release Gating Criteria](/sdk/getting-started/standards/review-ci#release-gating-criteria) — gates that may be expedited for critical patches +- [Release Gating Criteria](/sdk/getting-started/standards/review-ci#release-gating) — gates that may be expedited for critical patches --- diff --git a/develop-docs/sdk/getting-started/playbooks/development/handling-external-contributor-pr.mdx b/develop-docs/sdk/getting-started/playbooks/development/handling-external-contributor-pr.mdx index b495fdf7d313e..be8d528945bef 100644 --- a/develop-docs/sdk/getting-started/playbooks/development/handling-external-contributor-pr.mdx +++ b/develop-docs/sdk/getting-started/playbooks/development/handling-external-contributor-pr.mdx @@ -35,7 +35,7 @@ Related resources: #### 1. Triage within 2 business days -([Review SLAs](/sdk/getting-started/standards/review-ci#review-slas)). Every external PR **REQUIRES** a timely, substantive response. +([Review SLAs](/sdk/getting-started/standards/review-ci#code-review)). Every external PR **REQUIRES** a timely, substantive response. #### 2. Check for a linked issue @@ -55,7 +55,7 @@ Review it using the standard process ([Reviewing a PR](/sdk/getting-started/play #### 6. When requesting changes -You **MUST** be specific, use LOGAF prefixes ([Review feedback conventions](/sdk/getting-started/standards/review-ci#review-feedback-conventions)), and explain *why* — so the contributor (or their AI tool) can address the feedback effectively. +You **MUST** be specific, use LOGAF prefixes ([Review feedback conventions](/sdk/getting-started/standards/review-ci#code-review)), and explain *why* — so the contributor (or their AI tool) can address the feedback effectively. #### 7. Closing fast is kind @@ -63,8 +63,8 @@ A 30-second close with a clear, respectful reason is better than a PR that sits ## Referenced Standards -- [Review SLAs](/sdk/getting-started/standards/review-ci#review-slas) — timely response requirements -- [Review feedback conventions](/sdk/getting-started/standards/review-ci#review-feedback-conventions) — LOGAF scale for feedback +- [Review SLAs](/sdk/getting-started/standards/review-ci#code-review) — timely response requirements +- [Review feedback conventions](/sdk/getting-started/standards/review-ci#code-review) — LOGAF scale for feedback - [PR description quality](/sdk/getting-started/standards/code-submission#pr-description-quality) — linked issue requirement --- diff --git a/develop-docs/sdk/getting-started/playbooks/development/opening-a-pr.mdx b/develop-docs/sdk/getting-started/playbooks/development/opening-a-pr.mdx index 40d4f3df49e5a..b570aa1d841e7 100644 --- a/develop-docs/sdk/getting-started/playbooks/development/opening-a-pr.mdx +++ b/develop-docs/sdk/getting-started/playbooks/development/opening-a-pr.mdx @@ -75,7 +75,7 @@ When green, mark the PR as ready for review. #### 9. Assign 1–2 reviewers -If the PR touches public API, dependencies, or security-sensitive areas, you **MUST** assign an @sdk-seniors reviewer ([Required reviewers](/sdk/getting-started/standards/review-ci#required-reviewers)). +If the PR touches public API, dependencies, or security-sensitive areas, you **MUST** assign an @sdk-seniors reviewer ([Required reviewers](/sdk/getting-started/standards/review-ci#code-review)). ## Referenced Standards @@ -87,7 +87,7 @@ If the PR touches public API, dependencies, or security-sensitive areas, you **M - [Changelog entry](/sdk/getting-started/standards/code-submission#changelog-entry) — user-facing change documentation - [One logical change per PR](/sdk/getting-started/standards/code-submission#one-logical-change-per-pr) — focused PR scope - [Documentation-with-code](/sdk/getting-started/standards/repository-docs#documentation-with-code) — docs PR requirements -- [Required reviewers](/sdk/getting-started/standards/review-ci#required-reviewers) — @sdk-seniors review triggers +- [Required reviewers](/sdk/getting-started/standards/review-ci#code-review) — @sdk-seniors review triggers - [Test requirements by change type](/sdk/getting-started/standards/code-quality#test-requirements-by-change-type) — test coverage requirements --- diff --git a/develop-docs/sdk/getting-started/playbooks/development/reviewing-a-pr.mdx b/develop-docs/sdk/getting-started/playbooks/development/reviewing-a-pr.mdx index 5e8472db06074..ce9a6d572646d 100644 --- a/develop-docs/sdk/getting-started/playbooks/development/reviewing-a-pr.mdx +++ b/develop-docs/sdk/getting-started/playbooks/development/reviewing-a-pr.mdx @@ -63,11 +63,11 @@ You **SHOULD** use the [`sentry-skills:code-review`](https://github.com/getsentr #### 4. Check for @sdk-seniors review triggers -([Required reviewers](/sdk/getting-started/standards/review-ci#required-reviewers)): public API changes, new dependencies, schema changes, security-sensitive code, new frameworks. If any apply and no @sdk-seniors reviewer is assigned, flag it. +([Required reviewers](/sdk/getting-started/standards/review-ci#code-review)): public API changes, new dependencies, schema changes, security-sensitive code, new frameworks. If any apply and no @sdk-seniors reviewer is assigned, flag it. #### 5. Use LOGAF prefixes on all feedback -You **MUST** use LOGAF prefixes on all feedback ([Review feedback conventions](/sdk/getting-started/standards/review-ci#review-feedback-conventions)): +You **MUST** use LOGAF prefixes on all feedback ([Review feedback conventions](/sdk/getting-started/standards/review-ci#code-review)): - `h:` (high) — must fix before merge. Bugs, security issues, breakage, data loss. - `m:` (medium) — should fix. Design concerns, missing tests, unclear code. - `l:` (low) — optional nit. Style preferences, minor suggestions. @@ -78,9 +78,9 @@ You **MUST NOT** block for style preferences. The goal is risk reduction, not pe ## Referenced Standards -- [Review feedback conventions](/sdk/getting-started/standards/review-ci#review-feedback-conventions) — LOGAF scale and blocking criteria -- [Required reviewers](/sdk/getting-started/standards/review-ci#required-reviewers) — @sdk-seniors review triggers -- [Required CI checks baseline](/sdk/getting-started/standards/review-ci#required-ci-checks-baseline) — minimum CI requirements +- [Review feedback conventions](/sdk/getting-started/standards/review-ci#code-review) — LOGAF scale and blocking criteria +- [Required reviewers](/sdk/getting-started/standards/review-ci#code-review) — @sdk-seniors review triggers +- [Required CI checks baseline](/sdk/getting-started/standards/review-ci#required-ci-checks) — minimum CI requirements - [Test requirements by change type](/sdk/getting-started/standards/code-quality#test-requirements-by-change-type) — test coverage expectations - [Test quality](/sdk/getting-started/standards/code-quality#test-quality) — meaningful assertion requirements - [PR description quality](/sdk/getting-started/standards/code-submission#pr-description-quality) — description content requirements diff --git a/develop-docs/sdk/getting-started/playbooks/development/reviewing-ai-generated-code.mdx b/develop-docs/sdk/getting-started/playbooks/development/reviewing-ai-generated-code.mdx index 923b5a6a0999b..0b14642374c64 100644 --- a/develop-docs/sdk/getting-started/playbooks/development/reviewing-ai-generated-code.mdx +++ b/develop-docs/sdk/getting-started/playbooks/development/reviewing-ai-generated-code.mdx @@ -53,7 +53,7 @@ Public API, dependencies, schema changes, security-sensitive code, frameworks. #### 5. Use LOGAF prefixes on feedback -([Review feedback conventions](/sdk/getting-started/standards/review-ci#review-feedback-conventions)) +([Review feedback conventions](/sdk/getting-started/standards/review-ci#code-review)) #### 6. Approve when only `l:` items remain @@ -91,7 +91,7 @@ You **SHOULD** use the [`sentry-skills:find-bugs`](https://github.com/getsentry/ ## Referenced Standards -- [Review feedback conventions](/sdk/getting-started/standards/review-ci#review-feedback-conventions) — LOGAF scale and blocking criteria +- [Review feedback conventions](/sdk/getting-started/standards/review-ci#code-review) — LOGAF scale and blocking criteria - [Test requirements by change type](/sdk/getting-started/standards/code-quality#test-requirements-by-change-type) — test coverage expectations - [Test quality](/sdk/getting-started/standards/code-quality#test-quality) — meaningful assertion requirements - [AI attribution](/sdk/getting-started/standards/code-submission#ai-attribution) — Co-Authored-By footer requirement diff --git a/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/cutting-a-release.mdx b/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/cutting-a-release.mdx index acd028111bf2f..0a4f791b7ee14 100644 --- a/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/cutting-a-release.mdx +++ b/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/cutting-a-release.mdx @@ -39,7 +39,7 @@ Related resources: #### 1. Verify release gating criteria -You **MUST** verify all criteria pass ([Release gating criteria](/sdk/getting-started/standards/review-ci#release-gating-criteria)): +You **MUST** verify all criteria pass ([Release gating criteria](/sdk/getting-started/standards/review-ci#release-gating)): - All required CI checks pass on the default branch - No unresolved `h:` (high) review comments on merged PRs since last release - Changelog is substantive (not empty or internal-only for a release with user-facing changes) @@ -111,7 +111,7 @@ Common SDK-specific variations include: ## Referenced Standards -- [Release gating criteria](/sdk/getting-started/standards/review-ci#release-gating-criteria) — pre-release quality gates +- [Release gating criteria](/sdk/getting-started/standards/review-ci#release-gating) — pre-release quality gates - [Post-release monitoring](/sdk/getting-started/standards/coordination-maintenance#post-release-monitoring) — monitoring requirements and timeline - [Rollback procedures](/sdk/getting-started/standards/coordination-maintenance#rollback-procedures) — emergency rollback process diff --git a/develop-docs/sdk/getting-started/playbooks/setup/setting-up-new-sdk-repo.mdx b/develop-docs/sdk/getting-started/playbooks/setup/setting-up-new-sdk-repo.mdx index 2cdcd3e6aa61b..e1025815d3d4e 100644 --- a/develop-docs/sdk/getting-started/playbooks/setup/setting-up-new-sdk-repo.mdx +++ b/develop-docs/sdk/getting-started/playbooks/setup/setting-up-new-sdk-repo.mdx @@ -41,7 +41,7 @@ Related resources: Create the repository in the `getsentry` organization. You **MUST** configure branch protection rules: - Require CI checks to pass ([Required CI checks baseline](/sdk/getting-started/standards/review-ci#required-ci-checks)) -- Require at least one approving review ([Required reviewers](/sdk/getting-started/standards/review-ci#required-reviewers)) +- Require at least one approving review ([Required reviewers](/sdk/getting-started/standards/review-ci#code-review)) You **MUST** set up a `CODEOWNERS` file with team members to automatically request reviews. @@ -109,7 +109,7 @@ If the tool cannot do this, the documentation needs work. - [CONTRIBUTING.md](/sdk/getting-started/standards/repository-docs#contributing-md) — contributor guidelines - [PR template](/sdk/getting-started/standards/repository-docs#pr-template) — pull request template structure - [AI context file maintenance](/sdk/getting-started/standards/repository-docs#ai-context-maintenance) — maintaining AI-readable documentation -- [Required reviewers](/sdk/getting-started/standards/review-ci#required-reviewers) — review approval requirements +- [Required reviewers](/sdk/getting-started/standards/review-ci#code-review) — review approval requirements - [Required CI checks baseline](/sdk/getting-started/standards/review-ci#required-ci-checks) — minimum CI pipeline requirements - [Commit message format](/sdk/getting-started/standards/code-submission#commit-message-format) — conventional commit format - [Linting and formatting in CI](/sdk/getting-started/standards/code-quality#linting-formatting-ci) — automated code style checks diff --git a/develop-docs/sdk/getting-started/playbooks/setup/setting-up-release-infrastructure.mdx b/develop-docs/sdk/getting-started/playbooks/setup/setting-up-release-infrastructure.mdx index 67213ce13888f..9ba733dd05e79 100644 --- a/develop-docs/sdk/getting-started/playbooks/setup/setting-up-release-infrastructure.mdx +++ b/develop-docs/sdk/getting-started/playbooks/setup/setting-up-release-infrastructure.mdx @@ -129,7 +129,7 @@ For the ongoing release process after setup, see "Cutting a release" (wip). - [Version format](/sdk/getting-started/standards/release-versioning#version-format) — SemVer requirements - [Release tooling](/sdk/getting-started/standards/release-versioning#release-tooling) — Craft and publish setup -- [Release gating criteria](/sdk/getting-started/standards/review-ci#release-gating-criteria) — Pre-release validation requirements +- [Release gating criteria](/sdk/getting-started/standards/review-ci#release-gating) — Pre-release validation requirements - [Rollback procedures](/sdk/getting-started/standards/coordination-maintenance#rollback-procedures) — Emergency release rollback process --- From 0ac085ffcdee1d74d768eba0d72fb9bf18ebe08d Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Wed, 18 Mar 2026 11:56:15 +0100 Subject: [PATCH 3/9] chore: Apply suggestions from code review Co-authored-by: Stephanie Anderson --- develop-docs/sdk/getting-started/standards/review-ci.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop-docs/sdk/getting-started/standards/review-ci.mdx b/develop-docs/sdk/getting-started/standards/review-ci.mdx index 70c0120d93014..4c76ce2b7cb29 100644 --- a/develop-docs/sdk/getting-started/standards/review-ci.mdx +++ b/develop-docs/sdk/getting-started/standards/review-ci.mdx @@ -67,6 +67,7 @@ Every SDK repo **MUST** have these as required status checks: 2. Lint 3. Type check (where applicable) 4. Tests +5. Secret Scanning These are also recommended but not yet required everywhere: @@ -74,7 +75,6 @@ These are also recommended but not yet required everywhere: - Size and performance checks - API snapshot diffs - Changelog validation -- Secret scanning From 38ab68ff3bfbcada796c8e34994d71c19de02d21 Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Wed, 18 Mar 2026 11:38:58 +0100 Subject: [PATCH 4/9] docs(sdk): Rewrite API and Architecture spec for readability (#17014) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewrites the API and Architecture standards page to be more human-friendly: - Add intro paragraph framing the core philosophy - Replace rigid Rule/Enforcement/Per-SDK override template with natural prose - Merge breaking changes and deprecation lifecycle into one cohesive section - Remove enforcement boilerplate and StatusBadge components - Add contextual "why" before rules instead of dropping straight into requirements - Thin out RFC keyword density — keep MUST/REQUIRES for hard rules, plain language elsewhere - Promote spec status to stable --------- Co-authored-by: Claude --- .../sdk-lifecycle/breaking-changes.mdx | 12 +- .../sdk-lifecycle/deprecating-an-api.mdx | 10 +- .../dropping-platform-support.mdx | 10 +- .../standards/api-architecture.mdx | 173 +++++------------- 4 files changed, 65 insertions(+), 140 deletions(-) diff --git a/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/breaking-changes.mdx b/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/breaking-changes.mdx index e3d92f0e62be0..d02027b079f8c 100644 --- a/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/breaking-changes.mdx +++ b/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/breaking-changes.mdx @@ -23,8 +23,8 @@ spec_changelog: This playbook guides SDK maintainers through deciding whether a change is breaking and, if so, how to ship it with minimum friction for users. It covers classifying changes, estimating product impact, planning the release, and writing migration guidance. By following these steps, users will have clear migration paths and the SDK update experience will be as smooth as possible. Related resources: -- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — when a major release is required and what every breaking change must include -- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — the deprecation stages and timelines +- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — when a major release is required and what every breaking change must include +- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — the deprecation stages and timelines - [Deprecating an API](/sdk/getting-started/playbooks/sdk-lifecycle/deprecating-an-api) — step-by-step deprecation workflow - [Release and Versioning](/sdk/getting-started/standards/release-versioning) — SemVer requirements and release tooling @@ -68,7 +68,7 @@ For product-side changes, estimate how many users are affected before deciding o #### 3. Decide on release scope -Breaking changes **MUST** ship in a major version and **MUST NOT** ship in minor versions, per the [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process). Use the classification and impact data from the previous steps to plan the release. +Breaking changes **MUST** ship in a major version and **MUST NOT** ship in minor versions, per the [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation). Use the classification and impact data from the previous steps to plan the release. Consider the following when planning: @@ -78,7 +78,7 @@ Consider the following when planning: #### 4. Add deprecation warnings and a compatibility layer -In a prior minor release, prepare users for the upcoming change per the [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle): +In a prior minor release, prepare users for the upcoming change per the [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation): - Add runtime deprecation warnings that include: what is changing, what to use instead, and a link to migration docs - Where feasible, support a transitional phase where both the old and new behavior work — an SDK option acting as a feature flag is a good pattern @@ -120,8 +120,8 @@ If you do not have access, reach out to @sdk-seniors, the Data team or request a ## Referenced Standards -- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — when a major release is required, required artifacts, and enforcement -- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — deprecation timeline and stages +- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — when a major release is required, required artifacts, and enforcement +- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — deprecation timeline and stages - [Version format](/sdk/getting-started/standards/release-versioning#version-format) — SemVer requirements for major version bumps --- diff --git a/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/deprecating-an-api.mdx b/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/deprecating-an-api.mdx index c1d6097659d71..1c38b72f27954 100644 --- a/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/deprecating-an-api.mdx +++ b/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/deprecating-an-api.mdx @@ -25,8 +25,8 @@ spec_changelog: This playbook guides SDK maintainers through deprecating an API in a way that minimizes user disruption. It covers deprecation announcements, migration guide creation, maintenance periods, and eventual removal. By following these steps, users will have clear migration paths and sufficient time to adapt. Related resources: -- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — deprecation timeline and requirements -- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — process for eventual API removal +- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — deprecation timeline and requirements +- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — process for eventual API removal - [Aligning Cross-SDK Changes](/sdk/getting-started/playbooks/coordination/aligning-cross-sdk-changes) — coordinating deprecations across multiple SDKs --- @@ -60,7 +60,7 @@ This gives users time to migrate without breaking their applications immediately When removing the deprecated API in a major version, you **MUST**: - Remove the API and its tests -- Include `BREAKING CHANGE:` in the commit footer ([Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process)) +- Include `BREAKING CHANGE:` in the commit footer ([Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation)) - Update the migration guide to reference the major version that removes it #### 5. Communicate @@ -73,8 +73,8 @@ For high-impact deprecations, you **SHOULD** consider a blog post or announcemen ## Referenced Standards -- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — deprecation timeline requirements -- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — process for API removal in major versions +- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — deprecation timeline requirements +- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — process for API removal in major versions - [Documentation-with-Code](/sdk/getting-started/standards/repository-docs#documentation-with-code) — copy-pastable migration examples requirement - [Cross-SDK Coordination standard](/sdk/getting-started/standards/coordination-maintenance#cross-sdk-coordination) — coordinating multi-SDK changes diff --git a/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/dropping-platform-support.mdx b/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/dropping-platform-support.mdx index 0abc51bdec24f..aa82d9c5907dc 100644 --- a/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/dropping-platform-support.mdx +++ b/develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/dropping-platform-support.mdx @@ -24,8 +24,8 @@ This playbook guides SDK maintainers through dropping support for a platform or Related resources: - [Platform/language version support policy](/sdk/getting-started/standards/coordination-maintenance#platformlanguage-version-support-policy) — support policy and requirements -- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — process for removal in major versions -- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — deprecation timeline +- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — process for removal in major versions +- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — deprecation timeline --- @@ -61,7 +61,7 @@ When removing support in a major version, you **MUST**: - Drop the version from the CI test matrix - Update documentation (README, docs site) to reflect the removed support -- Include `BREAKING CHANGE:` in the commit footer ([Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process)) +- Include `BREAKING CHANGE:` in the commit footer ([Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation)) #### 5. Provide migration guidance @@ -73,8 +73,8 @@ This helps users understand the upgrade path and avoid breaking their applicatio ## Referenced Standards -- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — process for removal in major versions -- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — deprecation timeline requirements +- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — process for removal in major versions +- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — deprecation timeline requirements - [Platform/language version support policy](/sdk/getting-started/standards/coordination-maintenance#platformlanguage-version-support-policy) — support policy baseline --- diff --git a/develop-docs/sdk/getting-started/standards/api-architecture.mdx b/develop-docs/sdk/getting-started/standards/api-architecture.mdx index 291cb6aba8451..0af4b7c6d9b4c 100644 --- a/develop-docs/sdk/getting-started/standards/api-architecture.mdx +++ b/develop-docs/sdk/getting-started/standards/api-architecture.mdx @@ -2,7 +2,7 @@ title: API and Architecture spec_id: sdk/getting-started/standards/api-architecture spec_version: 1.0.0 -spec_status: candidate +spec_status: stable spec_platforms: - all spec_changelog: @@ -16,179 +16,104 @@ sidebar_order: 1 - +These standards guide how SDKs are designed and evolved. The core philosophy: prefer server-side logic, protect public API stability, and give users smooth upgrade paths. SDKs often stay installed for years after release, so decisions made today have long-lasting consequences. -## Server-side (Relay) vs. SDK-side decision gate + -#### Rule +## Server-side (Relay) vs. SDK implementation -New processing or transformation logic **MUST** default to server-side (Relay). +When deciding where new logic should live, default to server-side (Relay). Processing data in Relay keeps behavior consistent across SDK versions and avoids duplicating logic in clients that may remain deployed indefinitely. -Logic **SHOULD** only be implemented in the SDK when it meets one of these criteria: +Put logic in the SDK only when it genuinely needs to run client-side: -- **MUST** run before data leaves the customer's application (e.g., user-controlled filtering like `before_send_*`) -- **REQUIRES** access to platform-specific APIs -- Is strictly latency-sensitive -- **MUST** function in offline scenarios +- It **MUST** run before data leaves the customer's application (e.g., user-controlled filtering like `before_send_*`) +- It requires access to platform-specific APIs +- It's strictly latency-sensitive +- It **MUST** function in offline scenarios -Transformations of data that has already been collected should be handled in Relay. This ensures consistency across SDK versions and avoids duplicating logic in clients that may remain in use indefinitely. - -#### Enforcement - -- AGENTS.md instruction -- Human review - -#### Per-SDK override - - The default is universal. Justifications are -SDK-specific. +If data has already been collected, transform it in Relay. --- - - -## SDK-side logic must not break on server changes - -#### Rule - -SDKs typically outlive individual API versions, so forward compatibility is essential to prevent ecosystem breakage. - -SDKs **MUST** remain resilient to evolving server responses: - -- Additional fields -- Missing optional fields -- New enum values -- Rate limiting - -They **MUST NOT** fail due to additive changes. Unknown fields, categories, or dimensions **SHOULD** be safely ignored rather than causing errors. + -#### Enforcement +## Forward compatibility -- Integration tests for degraded server scenarios (additional fields, missing optional fields, new enum values, rate limiting) -- Human review +SDKs typically outlive individual API versions. A user might stay on an SDK release for months or years, while server responses continue to evolve. SDKs **MUST** handle this gracefully: -#### Per-SDK override +- Ignore unknown fields, categories, or dimensions rather than erroring +- Tolerate missing optional fields +- Accept new enum values without crashing +- Handle rate limiting responses - Specific tests vary. Principle is universal. +The general principle: additive server-side changes **MUST NOT** break existing SDK versions. --- - + -## Public API change approval gate +## Public API changes -#### Rule +Any change to public API — adding, modifying, deprecating, or removing — **REQUIRES** approval from an [SDK Senior Engineer](https://github.com/orgs/getsentry/teams/sdk-seniors). -Any change to public API (add, change, deprecate, remove) **REQUIRES** @sdk-seniors approval. Public API includes anything a user can call, import, configure, subclass, or otherwise reference. If there is any doubt whether something is public, check for usage in public repositories using the SDK. When still unsure, treat it as public. +Public API includes anything a user can call, import, configure, subclass, or otherwise reference. When in doubt, check for usage in public repositories. If you're still unsure, treat it as public. -#### Enforcement - -- CI API snapshot diffs (where feasible) -- Human review gate (@sdk-seniors approval) - -#### Suggested skill(s) - -- [`sentry-skills:code-review`](https://github.com/getsentry/skills#available-skills) — flags API changes for escalation. - -#### Per-SDK override - - Detection mechanisms are language-specific. Approval -requirement is universal. +How each SDK detects API changes (CI snapshot diffs, etc.) varies by language, but the approval requirement applies everywhere. --- - + -## Semantic conventions process +## Semantic conventions -#### Rule +Semantic conventions are shared across SDKs, ingest, and the product — treat them like public API. New attributes **MUST** be defined in [sentry-conventions](https://github.com/getsentry/sentry-conventions) before SDK implementation. The process: -New attributes **MUST** first be defined in [sentry-conventions](https://github.com/getsentry/sentry-conventions). -Process: +1. Open a PR to sentry-conventions +2. Get code owner approval +3. Wait at least 3 business days +4. Implement in the SDK -1. PR to sentry-conventions -2. code owner approval -3. 3 business day minimum wait -4. SDK implementation +This ensures attributes are reviewed and consistent across the ecosystem before any SDK ships them. -#### Enforcement - -- CI validation where feasible -- Human review - -#### Per-SDK override - - +Changes to existing attributes (renaming, removing, or changing semantics) are breaking changes and **MUST** follow the [breaking change process](#breaking-and-deprecation). The sentry-conventions repo has its own deprecation lifecycle — deprecated attributes go through a `backfill` period (at least 90 days) before moving to `normalize`, and replacements and aliases **MUST** be maintained for both old and new names during the transition. --- - - -## Breaking change process + -#### Rule +## Breaking changes and deprecations -Breaking changes **MUST** follow the [breaking changes playbook](/sdk/getting-started/playbooks/sdk-lifecycle/breaking-changes). +Breaking changes and deprecations are closely linked — every breaking change goes through a deprecation period first. Both follow a lifecycle designed to give users time and guidance to migrate. -Breaking changes **MAY** only ship in a major version. They **MUST NOT** ship in minor versions. Opt-in previews are allowed in minor versions. +### Deprecation lifecycle -A deprecation period is **REQUIRED** in a prior minor version, during which dual behavior is allowed to support migration. +Deprecations of public APIs, integrations, and supported platforms follow three stages: -Every breaking change **MUST** include: - -- A migration guide with copy-pastable examples -- A changelog entry using the BREAKING CHANGE: notation -- Validation of the migration guide using an LLM to ensure it is clear and complete - -#### Enforcement - -- [Commit footer BREAKING CHANGE:](/engineering-practices/commit-messages/#footer) triggers CI checks -- Breaking changes in non-major branches are CI-blocked -- Human review +1. **Announce** in a minor release: add a runtime warning (where possible), update the changelog and docs, and publish a migration guide. Warnings **MUST** include the replacement, a code example, and a link to migration docs. +2. **Keep it working** for at least one subsequent minor release (e.g., deprecated in X.Y, still functional in X.(Y+1)). +3. **Remove** only in the next major release (X+1.0). -#### Suggested skill(s) +Deprecating an entire SDK is a bigger deal — it requires customer impact analysis, a public announcement, updated documentation, a defined support timeline, and advance EOL notice. -- [`sentry-skills:code-review`](https://github.com/getsentry/skills#available-skills) +### Breaking changes -#### Per-SDK override - - Deprecation period timelines can vary. Process is -universal. - - - ---- +Breaking changes **MUST** follow the [breaking changes playbook](/sdk/getting-started/playbooks/sdk-lifecycle/breaking-changes). They can only ship in major versions; opt-in previews are allowed in minor versions. - - -## Deprecation lifecycle - -#### Rule - -All deprecations of public APIs, user-facing integrations, and supported platforms or frameworks follow three stages: - -1. Announce in a minor release with a runtime warning (where possible), updated changelog and documentation, and a migration guide. Warnings **MUST** include the replacement, a code example, and a link to the migration docs. -2. Keep the deprecated surface fully functional for at least one subsequent minor release (e.g., deprecated in X.Y, still supported in X.(Y+1)). -3. Remove only in the next major release (X+1.0). - -Deprecating an entire SDK **MUST NOT** be silent. It **REQUIRES** clear customer impact analysis, a public announcement, updated documentation, a defined support timeline, and advance EOL notice. - -#### Enforcement - -- CI checks deprecated APIs still have passing tests -- Human review +Every breaking change **MUST** include: -#### Per-SDK override +- A migration guide with copy-pastable examples +- A changelog entry using the `BREAKING CHANGE:` notation +- Validation of the migration guide using an LLM to ensure clarity and completeness - Minimum period can be extended. Stages are universal. +Deprecation timelines can vary by SDK, but the stages and process apply everywhere. From 0a768b9fbfe8f1955b41e56eae0fa86fd57f233e Mon Sep 17 00:00:00 2001 From: LucasZF Date: Wed, 18 Mar 2026 11:26:18 +0000 Subject: [PATCH 5/9] Develop: Correct typo from 'pare' to 'parse' in documentation (#16860) --- develop-docs/engineering-practices/commit-messages.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop-docs/engineering-practices/commit-messages.mdx b/develop-docs/engineering-practices/commit-messages.mdx index 806994a78e1be..2dac4dbf6dcec 100644 --- a/develop-docs/engineering-practices/commit-messages.mdx +++ b/develop-docs/engineering-practices/commit-messages.mdx @@ -16,7 +16,7 @@ sidebar_order: 10 ### Merge vs Rebase -Sentry uses a rebase workflow. That means that every commit on its own should be a clear, functional, and stable change. This means that when you’re building a new feature, you should try to pare it down into functional steps, and when that’s not reasonable, the end patch should be a single commit. This is counter to having a Pull Request which may include “fix [unmerged] behavior”. Those commits should be squashed, and the final patch when landed should be rebased. +Sentry uses a rebase workflow. That means that every commit on its own should be a clear, functional, and stable change. This means that when you’re building a new feature, you should try to parse it down into functional steps, and when that’s not reasonable, the end patch should be a single commit. This is counter to having a Pull Request which may include “fix [unmerged] behavior”. Those commits should be squashed, and the final patch when landed should be rebased. Remember: each commit should follow the commit message format and be stable (green build). From e1c1b9b1e33b6a8f97a555a4c62798a883ff0506 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 18 Mar 2026 12:26:20 +0100 Subject: [PATCH 6/9] Expo integration docs (#16923) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We've recently added a bunch of changes to Expo integrations in the React Native SDK, this PR adds the missing information about those changes to the docs. Here is the list of PRs it covers: - Expo Updates - https://github.com/getsentry/sentry-react-native/pull/5794 - https://github.com/getsentry/sentry-react-native/pull/5788 - https://github.com/getsentry/sentry-react-native/pull/5748 - Expo Config Plugin - https://github.com/getsentry/sentry-react-native/pull/5796 — 06d4e245 — Add environment option to Expo config plugin - EAS Build Integration - https://github.com/getsentry/sentry-react-native/pull/5666 - https://github.com/getsentry/sentry-react-native/pull/5773 - https://github.com/getsentry/sentry-react-native/pull/5617 - Expo Router / Tracing - https://github.com/getsentry/sentry-react-native/pull/5606 - https://github.com/getsentry/sentry-react-native/pull/5718 - Tooling / Fixes - https://github.com/getsentry/sentry-react-native/pull/5636 - https://github.com/getsentry/sentry-react-native/pull/5733 --- .../react-native/manual-setup/expo.mdx | 17 +++- .../manual-setup/expo/eas-build-hooks.mdx | 79 +++++++++++++++++++ .../manual-setup/expo/expo-updates.mdx | 74 +++++++++++++++++ .../instrumentation/expo-resources.mdx | 44 +++++++++++ .../tracing/instrumentation/expo-router.mdx | 28 +++++++ 5 files changed, 239 insertions(+), 3 deletions(-) create mode 100644 docs/platforms/react-native/manual-setup/expo/eas-build-hooks.mdx create mode 100644 docs/platforms/react-native/manual-setup/expo/expo-updates.mdx create mode 100644 docs/platforms/react-native/tracing/instrumentation/expo-resources.mdx diff --git a/docs/platforms/react-native/manual-setup/expo.mdx b/docs/platforms/react-native/manual-setup/expo.mdx index 3afafffef16bb..d7159b016a6b8 100644 --- a/docs/platforms/react-native/manual-setup/expo.mdx +++ b/docs/platforms/react-native/manual-setup/expo.mdx @@ -148,9 +148,20 @@ To verify that everything is working as expected, build the `Release` version of ## Next Steps -- [Learn how to upload source maps for native builds and Expo Updates](/platforms/react-native/sourcemaps/uploading/expo/) -- [Add automatic tracing with Expo Router](/platforms/react-native/tracing/instrumentation/expo-router/) -- [Configure the Sentry Android Gradle Plugin](/platforms/react-native/manual-setup/expo/gradle/) +### Expo-Specific Features + +- [Expo Updates](/platforms/react-native/manual-setup/expo/expo-updates/) — Automatic OTA update context, searchable tags, and emergency launch alerts +- [EAS Build Hooks](/platforms/react-native/manual-setup/expo/eas-build-hooks/) — Capture build failures and lifecycle events from EAS Build +- [Sentry Android Gradle Plugin](/platforms/react-native/manual-setup/expo/gradle/) — Advanced Android build configuration + +### Source Maps and Releases + +- [Upload source maps for native builds and Expo Updates](/platforms/react-native/sourcemaps/uploading/expo/) + +### Performance + +- [Expo Router tracing](/platforms/react-native/tracing/instrumentation/expo-router/) — Navigation transitions, performance spans, and prefetch instrumentation +- [Expo Image and Asset tracing](/platforms/react-native/tracing/instrumentation/expo-resources/) — Automatic spans for `expo-image` and `expo-asset` ## Notes diff --git a/docs/platforms/react-native/manual-setup/expo/eas-build-hooks.mdx b/docs/platforms/react-native/manual-setup/expo/eas-build-hooks.mdx new file mode 100644 index 0000000000000..06cc812ad7ebe --- /dev/null +++ b/docs/platforms/react-native/manual-setup/expo/eas-build-hooks.mdx @@ -0,0 +1,79 @@ +--- +title: EAS Build Hooks +description: "Capture EAS build failures and lifecycle events in Sentry." +sidebar_order: 10 +--- + +EAS Build runs your app builds on Expo's infrastructure. When a build fails, the error can be hard to diagnose — it happens outside your local environment and outside your app. EAS Build Hooks let you send build lifecycle events directly to Sentry so you can track failures, correlate them with releases, and get notified when production builds break. + +## Setup + +Add the Sentry EAS build hook scripts to your `package.json`: + +```json {filename:package.json} +{ + "scripts": { + "eas-build-on-error": "sentry-eas-build-on-error", + "eas-build-on-success": "sentry-eas-build-on-success", + "eas-build-on-complete": "sentry-eas-build-on-complete" + } +} +``` + +EAS Build automatically runs `package.json` scripts with these names at the corresponding lifecycle events. See the [Expo npm hooks documentation](https://docs.expo.dev/build-reference/npm-hooks/) for more details. + +Set your DSN as an EAS secret or environment variable so it's available during builds: + +```bash +eas secret:create --scope project --name SENTRY_DSN --value +``` + +## What Gets Captured + +**`eas-build-on-error`** — Sends an `EASBuildError` event to Sentry when a build fails. The event includes: + +- Build platform (`ios` / `android`) +- Build profile (for example, `production`, `preview`) +- Build ID, project ID, git commit hash +- Whether the build ran on CI + +**`eas-build-on-success`** — Optionally sends an info event when a build succeeds. Disabled by default; enable it with `SENTRY_EAS_BUILD_CAPTURE_SUCCESS=true`. + +**`eas-build-on-complete`** — A single hook that captures either a failure or success event depending on the build outcome. Use this instead of `on-error` + `on-success` if you prefer a single hook entry point. + +All events are tagged with `eas.*` tags so you can filter and group them in Sentry. + +## Environment Variables + +| Variable | Required | Description | +|---|---|---| +| `SENTRY_DSN` | Yes | Your project's DSN | +| `SENTRY_EAS_BUILD_CAPTURE_SUCCESS` | No | Set to `true` to capture successful builds | +| `SENTRY_EAS_BUILD_TAGS` | No | JSON object of additional tags, for example `{"team":"mobile"}` | +| `SENTRY_EAS_BUILD_ERROR_MESSAGE` | No | Custom error message for failed builds | +| `SENTRY_EAS_BUILD_SUCCESS_MESSAGE` | No | Custom message for successful builds | +| `SENTRY_RELEASE` | No | Override the release name (defaults to `{appVersion}+{buildNumber}`) | + +## Environment Files + +The hook automatically loads environment variables from the following sources (without overwriting values already set by EAS): + +1. `@expo/env` (if available) +2. `.env` file in the project root (via `dotenv`, if available) +3. `.env.sentry-build-plugin` file in the project root + +This means you can store the DSN in `.env.sentry-build-plugin` locally, and use an EAS secret in CI — the hook will use whichever value is already set. + +## Using `on-complete` Instead of Separate Hooks + +If you only need to track failures but want the option to add success tracking later, `eas-build-on-complete` is the most flexible option. It reads `EAS_BUILD_STATUS` (set by EAS) to determine the outcome and captures the appropriate event: + +```json {filename:package.json} +{ + "scripts": { + "eas-build-on-complete": "sentry-eas-build-on-complete" + } +} +``` + +To also capture successful builds, set `SENTRY_EAS_BUILD_CAPTURE_SUCCESS=true` in your build environment. diff --git a/docs/platforms/react-native/manual-setup/expo/expo-updates.mdx b/docs/platforms/react-native/manual-setup/expo/expo-updates.mdx new file mode 100644 index 0000000000000..0035f49ded738 --- /dev/null +++ b/docs/platforms/react-native/manual-setup/expo/expo-updates.mdx @@ -0,0 +1,74 @@ +--- +title: Expo Updates +description: "Automatic context and alerts for Expo OTA updates." +sidebar_order: 20 +--- + +When you ship OTA updates with Expo Updates, events captured by Sentry are automatically enriched with information about which update is running. This lets you filter issues by update channel, runtime version, or update ID — and get alerted when an emergency launch occurs. + +These integrations are enabled by default in Expo projects. No additional setup is required. + +## Expo Updates Context + +Every Sentry event includes an `ota_updates` context with the current update state: + +| Field | Description | +|---|---| +| `update_id` | UUID of the currently running OTA update | +| `channel` | Expo Updates channel (for example, `production`, `staging`) | +| `runtime_version` | Runtime version of the update | +| `is_enabled` | Whether Expo Updates is enabled | +| `is_embedded_launch` | Whether the app launched from the embedded bundle | +| `is_using_embedded_assets` | Whether the app is using embedded assets | +| `is_emergency_launch` | Whether this was an emergency launch (fallback to embedded) | +| `emergency_launch_reason` | Reason for the emergency launch (if applicable) | +| `check_automatically` | Automatic update check policy | +| `launch_duration` | How long the update launch took (ms) | +| `created_at` | When the update was created | + +## Searchable Tags + +The SDK also sets the following tags on every event so you can filter and group issues in Sentry: + +| Tag | Value | +|---|---| +| `expo.updates.update_id` | UUID of the running update | +| `expo.updates.channel` | Update channel name | +| `expo.updates.runtime_version` | Runtime version string | + +To find all issues from a specific update channel, use `expo.updates.channel:production` in the Sentry issue search. + +## Emergency Launch Warnings + +Expo Updates performs an _emergency launch_ when it fails to load the latest OTA update and falls back to the embedded bundle. This can silently degrade user experience. + +When the SDK detects an emergency launch at startup, it automatically sends a `warning`-level event to Sentry with: + +- Message: `Expo Updates emergency launch: ` (or `Expo Updates emergency launch` if no reason is available) +- Tag: `expo.updates.emergency_launch: true` + +You can set up a Sentry alert on this tag to get notified whenever an emergency launch happens in production. + + + +Emergency launch detection only runs in native builds, not in Expo Go. + + + +## Expo Constants Context + +The SDK automatically captures Expo Constants as an `expo_constants` context on every event. This provides metadata about the execution environment and app configuration: + +| Field | Description | +|---|---| +| `execution_environment` | Where the app is running (`storeClient`, `standalone`, `bare`) | +| `app_ownership` | Whether the app runs in Expo Go or standalone | +| `debug_mode` | Whether debug mode is enabled | +| `expo_version` | Expo client version | +| `expo_runtime_version` | Runtime version from app config | +| `session_id` | Current session ID | +| `app_name` | App name from `app.json` | +| `app_slug` | App slug from `app.json` | +| `app_version` | App version from `app.json` | +| `expo_sdk_version` | Expo SDK version | +| `eas_project_id` | EAS project ID | diff --git a/docs/platforms/react-native/tracing/instrumentation/expo-resources.mdx b/docs/platforms/react-native/tracing/instrumentation/expo-resources.mdx new file mode 100644 index 0000000000000..8f4a1fd993cbf --- /dev/null +++ b/docs/platforms/react-native/tracing/instrumentation/expo-resources.mdx @@ -0,0 +1,44 @@ +--- +title: Expo Image and Asset Instrumentation +description: "Automatic performance spans for expo-image and expo-asset." +sidebar_order: 70 +--- + +Image and asset loading times directly affect how quickly your app feels responsive. The SDK can automatically create performance spans for `expo-image` and `expo-asset` operations so you can see exactly how long prefetching and loading takes within your existing traces. + +## Expo Image + +Wrap the `Image` class from `expo-image` once at app startup to instrument `Image.prefetch()` and `Image.loadAsync()`: + +```javascript {filename:App.js} +import { Image } from 'expo-image'; +import * as Sentry from '@sentry/react-native'; + +Sentry.wrapExpoImage(Image); +``` + +After wrapping, every call to `Image.prefetch()` creates a `resource.image.prefetch` span, and every call to `Image.loadAsync()` creates a `resource.image.load` span. The spans are automatically linked to the active trace. + +Span attributes include: + +- `image.url` — the image URL (for single-image operations) +- `image.url_count` — number of URLs (for batch prefetch) + +## Expo Asset + +Wrap the `Asset` class from `expo-asset` once at app startup to instrument `Asset.loadAsync()`: + +```javascript {filename:App.js} +import { Asset } from 'expo-asset'; +import * as Sentry from '@sentry/react-native'; + +Sentry.wrapExpoAsset(Asset); +``` + +After wrapping, every call to `Asset.loadAsync()` creates a `resource.asset` span with an `asset.count` attribute. + +## Notes + +- Both `wrapExpoImage` and `wrapExpoAsset` are safe to call multiple times — the SDK guards against double-wrapping. +- Spans are only created when a trace is active. If you're not using [tracing](/platforms/react-native/tracing/), no spans are created and there's no overhead. +- `expo-image` and `expo-asset` are peer dependencies — the SDK does not require them to be installed. diff --git a/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx b/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx index 06bb3ed948a50..aee83eb1a7f5c 100644 --- a/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx +++ b/docs/platforms/react-native/tracing/instrumentation/expo-router.mdx @@ -69,6 +69,34 @@ This option will enable automatic measuring of the time to initial display for e This ensures that transactions that are from routes that've been seen and don't have any spans, are not being sampled. This removes a lot of clutter, making it so that most back navigation transactions are now ignored. The default value is `true`. +## Prefetch Instrumentation + + + +`router.prefetch()` requires **Expo Router v5 (Expo SDK 53) or later**. On older versions the method does not exist; calling it will throw a runtime error. + + + +Expo Router's `router.prefetch()` preloads a route before the user navigates to it. By default, these prefetch calls are invisible in your traces. Wrapping the router with `Sentry.wrapExpoRouter()` adds an automatic `navigation.prefetch` span for each call so you can see prefetch timing alongside your other navigation spans. + +```javascript {filename:app/(tabs)/index.tsx} +import { useRouter } from 'expo-router'; +import * as Sentry from '@sentry/react-native'; + +function HomeScreen() { + const router = Sentry.wrapExpoRouter(useRouter()); + + return ( +