Skip to content

Commit 30c9664

Browse files
stephanie-andersonclaude
authored andcommitted
docs(sdk): Rewrite API and Architecture spec for readability (#17014)
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 <noreply@anthropic.com>
1 parent 5fccd46 commit 30c9664

File tree

4 files changed

+65
-140
lines changed

4 files changed

+65
-140
lines changed

develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/breaking-changes.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ spec_changelog:
2323
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.
2424

2525
Related resources:
26-
- [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
27-
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — the deprecation stages and timelines
26+
- [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
27+
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — the deprecation stages and timelines
2828
- [Deprecating an API](/sdk/getting-started/playbooks/sdk-lifecycle/deprecating-an-api) — step-by-step deprecation workflow
2929
- [Release and Versioning](/sdk/getting-started/standards/release-versioning) — SemVer requirements and release tooling
3030

@@ -68,7 +68,7 @@ For product-side changes, estimate how many users are affected before deciding o
6868

6969
#### 3. Decide on release scope
7070

71-
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.
71+
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.
7272

7373
Consider the following when planning:
7474

@@ -78,7 +78,7 @@ Consider the following when planning:
7878

7979
#### 4. Add deprecation warnings and a compatibility layer
8080

81-
In a prior minor release, prepare users for the upcoming change per the [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle):
81+
In a prior minor release, prepare users for the upcoming change per the [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation):
8282

8383
- Add runtime deprecation warnings that include: what is changing, what to use instead, and a link to migration docs
8484
- 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
120120

121121
## Referenced Standards
122122

123-
- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — when a major release is required, required artifacts, and enforcement
124-
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — deprecation timeline and stages
123+
- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — when a major release is required, required artifacts, and enforcement
124+
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — deprecation timeline and stages
125125
- [Version format](/sdk/getting-started/standards/release-versioning#version-format) — SemVer requirements for major version bumps
126126

127127
---

develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/deprecating-an-api.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ spec_changelog:
2525
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.
2626

2727
Related resources:
28-
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — deprecation timeline and requirements
29-
- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — process for eventual API removal
28+
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — deprecation timeline and requirements
29+
- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — process for eventual API removal
3030
- [Aligning Cross-SDK Changes](/sdk/getting-started/playbooks/coordination/aligning-cross-sdk-changes) — coordinating deprecations across multiple SDKs
3131

3232
---
@@ -60,7 +60,7 @@ This gives users time to migrate without breaking their applications immediately
6060
When removing the deprecated API in a major version, you **MUST**:
6161

6262
- Remove the API and its tests
63-
- Include `BREAKING CHANGE:` in the commit footer ([Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process))
63+
- Include `BREAKING CHANGE:` in the commit footer ([Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation))
6464
- Update the migration guide to reference the major version that removes it
6565

6666
#### 5. Communicate
@@ -73,8 +73,8 @@ For high-impact deprecations, you **SHOULD** consider a blog post or announcemen
7373

7474
## Referenced Standards
7575

76-
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — deprecation timeline requirements
77-
- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — process for API removal in major versions
76+
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — deprecation timeline requirements
77+
- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — process for API removal in major versions
7878
- [Documentation-with-Code](/sdk/getting-started/standards/repository-docs#documentation-with-code) — copy-pastable migration examples requirement
7979
- [Cross-SDK Coordination standard](/sdk/getting-started/standards/coordination-maintenance#cross-sdk-coordination) — coordinating multi-SDK changes
8080

develop-docs/sdk/getting-started/playbooks/sdk-lifecycle/dropping-platform-support.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ This playbook guides SDK maintainers through dropping support for a platform or
2424

2525
Related resources:
2626
- [Platform/language version support policy](/sdk/getting-started/standards/coordination-maintenance#platformlanguage-version-support-policy) — support policy and requirements
27-
- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — process for removal in major versions
28-
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — deprecation timeline
27+
- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — process for removal in major versions
28+
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — deprecation timeline
2929

3030
---
3131

@@ -61,7 +61,7 @@ When removing support in a major version, you **MUST**:
6161

6262
- Drop the version from the CI test matrix
6363
- Update documentation (README, docs site) to reflect the removed support
64-
- Include `BREAKING CHANGE:` in the commit footer ([Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process))
64+
- Include `BREAKING CHANGE:` in the commit footer ([Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation))
6565

6666
#### 5. Provide migration guidance
6767

@@ -73,8 +73,8 @@ This helps users understand the upgrade path and avoid breaking their applicatio
7373

7474
## Referenced Standards
7575

76-
- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-change-process) — process for removal in major versions
77-
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle) — deprecation timeline requirements
76+
- [Breaking change process](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — process for removal in major versions
77+
- [Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation) — deprecation timeline requirements
7878
- [Platform/language version support policy](/sdk/getting-started/standards/coordination-maintenance#platformlanguage-version-support-policy) — support policy baseline
7979

8080
---

develop-docs/sdk/getting-started/standards/api-architecture.mdx

Lines changed: 49 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: API and Architecture
33
spec_id: sdk/getting-started/standards/api-architecture
44
spec_version: 1.0.0
5-
spec_status: candidate
5+
spec_status: stable
66
spec_platforms:
77
- all
88
spec_changelog:
@@ -16,179 +16,104 @@ sidebar_order: 1
1616

1717
<SpecMeta />
1818

19-
<SpecSection id="relay-decision-gate" status="candidate" since="1.0.0">
19+
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.
2020

21-
## Server-side (Relay) vs. SDK-side decision gate
21+
<SpecSection id="relay-decision-gate" status="stable" since="1.0.0">
2222

23-
#### Rule
23+
## Server-side (Relay) vs. SDK implementation
2424

25-
New processing or transformation logic **MUST** default to server-side (Relay).
25+
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.
2626

27-
Logic **SHOULD** only be implemented in the SDK when it meets one of these criteria:
27+
Put logic in the SDK only when it genuinely needs to run client-side:
2828

29-
- **MUST** run before data leaves the customer's application (e.g., user-controlled filtering like `before_send_*`)
30-
- **REQUIRES** access to platform-specific APIs
31-
- Is strictly latency-sensitive
32-
- **MUST** function in offline scenarios
29+
- It **MUST** run before data leaves the customer's application (e.g., user-controlled filtering like `before_send_*`)
30+
- It requires access to platform-specific APIs
31+
- It's strictly latency-sensitive
32+
- It **MUST** function in offline scenarios
3333

34-
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.
35-
36-
#### Enforcement
37-
38-
- AGENTS.md instruction
39-
- Human review
40-
41-
#### Per-SDK override
42-
43-
<StatusBadge type="no" /> The default is universal. Justifications are
44-
SDK-specific.
34+
If data has already been collected, transform it in Relay.
4535

4636
</SpecSection>
4737

4838
---
4939

50-
<SpecSection id="forward-compatibility" status="candidate" since="1.0.0">
51-
52-
## SDK-side logic must not break on server changes
53-
54-
#### Rule
55-
56-
SDKs typically outlive individual API versions, so forward compatibility is essential to prevent ecosystem breakage.
57-
58-
SDKs **MUST** remain resilient to evolving server responses:
59-
60-
- Additional fields
61-
- Missing optional fields
62-
- New enum values
63-
- Rate limiting
64-
65-
They **MUST NOT** fail due to additive changes. Unknown fields, categories, or dimensions **SHOULD** be safely ignored rather than causing errors.
40+
<SpecSection id="forward-compatibility" status="stable" since="1.0.0">
6641

67-
#### Enforcement
42+
## Forward compatibility
6843

69-
- Integration tests for degraded server scenarios (additional fields, missing optional fields, new enum values, rate limiting)
70-
- Human review
44+
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:
7145

72-
#### Per-SDK override
46+
- Ignore unknown fields, categories, or dimensions rather than erroring
47+
- Tolerate missing optional fields
48+
- Accept new enum values without crashing
49+
- Handle rate limiting responses
7350

74-
<StatusBadge type="yes" /> Specific tests vary. Principle is universal.
51+
The general principle: additive server-side changes **MUST NOT** break existing SDK versions.
7552

7653
</SpecSection>
7754

7855
---
7956

80-
<SpecSection id="public-api-approval" status="candidate" since="1.0.0">
57+
<SpecSection id="public-api-approval" status="stable" since="1.0.0">
8158

82-
## Public API change approval gate
59+
## Public API changes
8360

84-
#### Rule
61+
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).
8562

86-
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.
63+
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.
8764

88-
#### Enforcement
89-
90-
- CI API snapshot diffs (where feasible)
91-
- Human review gate (@sdk-seniors approval)
92-
93-
#### Suggested skill(s)
94-
95-
- [`sentry-skills:code-review`](https://github.com/getsentry/skills#available-skills) — flags API changes for escalation.
96-
97-
#### Per-SDK override
98-
99-
<StatusBadge type="yes" /> Detection mechanisms are language-specific. Approval
100-
requirement is universal.
65+
How each SDK detects API changes (CI snapshot diffs, etc.) varies by language, but the approval requirement applies everywhere.
10166

10267
</SpecSection>
10368

10469
---
10570

106-
<SpecSection id="semantic-conventions-process" status="candidate" since="1.0.0">
71+
<SpecSection id="semantic-conventions-process" status="stable" since="1.0.0">
10772

108-
## Semantic conventions process
73+
## Semantic conventions
10974

110-
#### Rule
75+
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:
11176

112-
New attributes **MUST** first be defined in [sentry-conventions](https://github.com/getsentry/sentry-conventions).
113-
Process:
77+
1. Open a PR to sentry-conventions
78+
2. Get code owner approval
79+
3. Wait at least 3 business days
80+
4. Implement in the SDK
11481

115-
1. PR to sentry-conventions
116-
2. code owner approval
117-
3. 3 business day minimum wait
118-
4. SDK implementation
82+
This ensures attributes are reviewed and consistent across the ecosystem before any SDK ships them.
11983

120-
#### Enforcement
121-
122-
- CI validation where feasible
123-
- Human review
124-
125-
#### Per-SDK override
126-
127-
<StatusBadge type="no" />
84+
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.
12885

12986
</SpecSection>
13087

13188
---
13289

133-
<SpecSection id="breaking-change-process" status="candidate" since="1.0.0">
134-
135-
## Breaking change process
90+
<SpecSection id="breaking-and-deprecation" status="stable" since="1.0.0">
13691

137-
#### Rule
92+
## Breaking changes and deprecations
13893

139-
Breaking changes **MUST** follow the [breaking changes playbook](/sdk/getting-started/playbooks/sdk-lifecycle/breaking-changes).
94+
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.
14095

141-
Breaking changes **MAY** only ship in a major version. They **MUST NOT** ship in minor versions. Opt-in previews are allowed in minor versions.
96+
### Deprecation lifecycle
14297

143-
A deprecation period is **REQUIRED** in a prior minor version, during which dual behavior is allowed to support migration.
98+
Deprecations of public APIs, integrations, and supported platforms follow three stages:
14499

145-
Every breaking change **MUST** include:
146-
147-
- A migration guide with copy-pastable examples
148-
- A changelog entry using the BREAKING CHANGE: notation
149-
- Validation of the migration guide using an LLM to ensure it is clear and complete
150-
151-
#### Enforcement
152-
153-
- [Commit footer BREAKING CHANGE:](/engineering-practices/commit-messages/#footer) triggers CI checks
154-
- Breaking changes in non-major branches are CI-blocked
155-
- Human review
100+
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.
101+
2. **Keep it working** for at least one subsequent minor release (e.g., deprecated in X.Y, still functional in X.(Y+1)).
102+
3. **Remove** only in the next major release (X+1.0).
156103

157-
#### Suggested skill(s)
104+
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.
158105

159-
- [`sentry-skills:code-review`](https://github.com/getsentry/skills#available-skills)
106+
### Breaking changes
160107

161-
#### Per-SDK override
162-
163-
<StatusBadge type="yes" /> Deprecation period timelines can vary. Process is
164-
universal.
165-
166-
</SpecSection>
167-
168-
---
108+
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.
169109

170-
<SpecSection id="deprecation-lifecycle" status="candidate" since="1.0.0">
171-
172-
## Deprecation lifecycle
173-
174-
#### Rule
175-
176-
All deprecations of public APIs, user-facing integrations, and supported platforms or frameworks follow three stages:
177-
178-
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.
179-
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)).
180-
3. Remove only in the next major release (X+1.0).
181-
182-
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.
183-
184-
#### Enforcement
185-
186-
- CI checks deprecated APIs still have passing tests
187-
- Human review
110+
Every breaking change **MUST** include:
188111

189-
#### Per-SDK override
112+
- A migration guide with copy-pastable examples
113+
- A changelog entry using the `BREAKING CHANGE:` notation
114+
- Validation of the migration guide using an LLM to ensure clarity and completeness
190115

191-
<StatusBadge type="yes" /> Minimum period can be extended. Stages are universal.
116+
Deprecation timelines can vary by SDK, but the stages and process apply everywhere.
192117

193118
</SpecSection>
194119

0 commit comments

Comments
 (0)