Skip to content

Commit 94c0c12

Browse files
committed
Merge branch 'fix-restoring-cloudflare-guides' into fix-ai-snippets-titles-logger-details
* fix-restoring-cloudflare-guides: standardizing titles Updating description Restoring guides for cloudflare frameworks chore(platform): Move next config file + bump sentry (#13932) feat(apple): Code for NSExceptions in configure (#13941) ref: add minimum required OS version for relay binary (#13899) fix(llm-rules-platform): Fix typo (#13942) Update Python migration guide (#13939) docs(js): Add alert on auto-instrumentation for react-router framework (#13929) feat: Improve Cloudflare and Hono docs (#13938) feat: Improve Hono docs to cover errors + Node.js (#13936) feat(native): reflect windows support for crashpad-wait-for-upload in… (#13864) feat(native): reflect windows support for crashpad-wait-for-upload in… (#13865) ref(docs): update instances of yarn dev-ui to be pnpm (#13935) feat(native): reflect windows support for crashpad-wait-for-upload in… (#13863) chore(plugins): Reflect deprecation in the docs (#13812)
2 parents ff28afe + 84a17e9 commit 94c0c12

File tree

38 files changed

+741
-484
lines changed

38 files changed

+741
-484
lines changed
Lines changed: 310 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,310 @@
1+
---
2+
description: LLM Contribution Guidelines for Sentry Documentation
3+
globs:
4+
alwaysApply: false
5+
---
6+
# LLM Contribution Guidelines for Sentry Documentation
7+
8+
## Overview
9+
10+
This is a Next.js documentation site using MDX for content management. The codebase serves SDK documentation for multiple platforms and frameworks with a sophisticated shared content system.
11+
12+
## File Structure & Organization
13+
14+
### Core Directories
15+
16+
```
17+
docs/ # All documentation content
18+
├── platforms/ # Platform-specific documentation
19+
│ ├── javascript/
20+
│ │ ├── config.yml # Platform configuration
21+
│ │ ├── common/ # Shared content for JS platform
22+
│ │ └── guides/ # Framework-specific guides
23+
│ │ ├── hono/
24+
│ │ ├── express/
25+
│ │ └── react/
26+
│ ├── python/
27+
│ └── ...
28+
├── product/ # Product documentation
29+
├── api/ # API documentation
30+
└── concepts/ # Conceptual documentation
31+
32+
platform-includes/ # Shared content across platforms
33+
├── getting-started-install/
34+
├── getting-started-config/
35+
└── getting-started-verify/
36+
37+
includes/ # General shared content
38+
src/ # Application source code
39+
├── components/ # React components
40+
├── mdx.ts # MDX processing logic
41+
└── types/ # TypeScript types
42+
```
43+
44+
## Content Creation Rules
45+
46+
### 1. MDX File Structure
47+
48+
All documentation files must use MDX format with YAML frontmatter:
49+
50+
```mdx
51+
---
52+
title: "Framework Name"
53+
description: "Learn how to set up Framework with Sentry."
54+
sdk: sentry.javascript.framework
55+
categories:
56+
- javascript
57+
- server
58+
sidebar_order: 10
59+
---
60+
61+
<PlatformContent includePath="getting-started-primer" />
62+
63+
Content goes here...
64+
```
65+
66+
### 2. Required Frontmatter Fields
67+
68+
- `title`: Page title (used in navigation and SEO)
69+
- `description`: Meta description for SEO
70+
- `sdk`: SDK identifier (format: `sentry.{platform}.{guide}`)
71+
- `categories`: Array of category tags
72+
73+
### 3. Optional Frontmatter Fields
74+
75+
- `sidebar_order`: Controls navigation order (lower = higher in list)
76+
- `sidebar_title`: Override sidebar display name
77+
- `sidebar_hidden`: Hide from sidebar navigation
78+
- `draft`: Mark as draft (hidden from navigation)
79+
- `supported`: Array of platforms/guides this content supports
80+
- `notSupported`: Array of platforms/guides this content doesn't support
81+
82+
## Component Usage
83+
84+
### Platform-Specific Content
85+
86+
Use `<PlatformContent>` for shared, platform-specific content:
87+
88+
```mdx
89+
<PlatformContent includePath="getting-started-install" />
90+
<PlatformContent includePath="getting-started-config" />
91+
```
92+
93+
### Onboarding Options
94+
95+
For feature selection interfaces:
96+
97+
```mdx
98+
<OnboardingOptionButtons
99+
options={["error-monitoring", "performance", "profiling"]}
100+
/>
101+
```
102+
103+
### Code Blocks with Tabs
104+
105+
For package manager instructions:
106+
107+
```mdx
108+
```bash {tabTitle:npm}
109+
npm install @sentry/node --save
110+
```
111+
112+
```bash {tabTitle:yarn}
113+
yarn add @sentry/node
114+
```
115+
116+
```bash {tabTitle:pnpm}
117+
pnpm add @sentry/node
118+
```
119+
```
120+
121+
### Code Highlighting
122+
123+
Use filename annotations and highlighting:
124+
125+
```mdx
126+
```typescript {filename:index.ts}
127+
import * as Sentry from "@sentry/node";
128+
129+
Sentry.init({
130+
dsn: "___PUBLIC_DSN___",
131+
});
132+
```
133+
```
134+
135+
### Alerts and Callouts
136+
137+
```mdx
138+
<Alert level="info" title="Important Note">
139+
Content here...
140+
</Alert>
141+
142+
<Alert level="warning">
143+
Warning content...
144+
</Alert>
145+
```
146+
147+
### Links
148+
149+
```mdx
150+
<PlatformLink to="/configuration/">Configuration</PlatformLink>
151+
```
152+
153+
### Expandable Sections
154+
155+
```mdx
156+
<Expandable title="Optional Section">
157+
Additional details...
158+
</Expandable>
159+
```
160+
161+
## Platform-Specific Guidelines
162+
163+
### JavaScript Guides
164+
165+
1. **Location**: Place under `docs/platforms/javascript/guides/{framework}/`
166+
2. **Naming**: Use lowercase, hyphenated names (e.g., `next-js`, `react-native`)
167+
3. **Structure**: Most guides should be simple and leverage shared content:
168+
169+
```mdx
170+
---
171+
title: "Framework Name"
172+
description: "Learn how to set up Framework with Sentry."
173+
sdk: sentry.javascript.framework
174+
fallbackGuide: javascript.node # For server-side frameworks
175+
categories:
176+
- javascript
177+
- server # or 'browser' for client-side
178+
---
179+
180+
<PlatformContent includePath="getting-started-primer" />
181+
182+
Brief framework-specific introduction...
183+
184+
<PlatformContent includePath="getting-started-node" />
185+
```
186+
187+
### Shared Content Creation
188+
189+
Create shared content in `platform-includes/` when:
190+
- Content applies to multiple frameworks within a platform
191+
- Installation/configuration steps are similar
192+
- Verification steps are identical
193+
194+
### Content Resolution Priority
195+
196+
The system resolves content in this order:
197+
1. Guide-specific: `platform-includes/path/{platform}.{guide}.mdx`
198+
2. Platform-specific: `platform-includes/path/{platform}.mdx`
199+
3. Default: `platform-includes/path/_default.mdx`
200+
201+
## Content Standards
202+
203+
### Writing Style
204+
205+
1. **Be concise**: Avoid unnecessary explanations
206+
2. **Use active voice**: "Install the SDK" not "The SDK should be installed"
207+
3. **Provide working examples**: All code samples must be functional
208+
4. **Include all imports**: Don't assume imports are obvious
209+
210+
### Code Samples
211+
212+
1. **Complete examples**: Include all necessary imports and setup
213+
2. **Use placeholders**: Use `___PUBLIC_DSN___` for DSN values
214+
3. **Add context**: Use filename annotations
215+
4. **Test functionality**: Ensure examples work as written
216+
217+
### Error Handling
218+
219+
Always include error handling examples:
220+
221+
```typescript
222+
app.onError((err, c) => {
223+
Sentry.captureException(err);
224+
if (err instanceof HTTPException) {
225+
return err.getResponse()
226+
}
227+
return c.json({ error: "Internal server error" }, 500)
228+
})
229+
```
230+
231+
## File Naming Conventions
232+
233+
- Guide directories: lowercase with hyphens (`react-native`, `next-js`)
234+
- MDX files: `index.mdx` for main content
235+
- Versioned files: `index__v{version}.mdx` for version-specific content
236+
- Images: descriptive names in local `img/` directories
237+
238+
## Navigation & Discovery
239+
240+
### Sidebar Order
241+
242+
Control navigation order with `sidebar_order`:
243+
- Getting started: 1-10
244+
- Configuration: 11-20
245+
- Advanced topics: 21-30
246+
- Troubleshooting: 90+
247+
248+
### Page Grids
249+
250+
For overview pages, use `<PageGrid>` to auto-generate child page listings:
251+
252+
```mdx
253+
<PageGrid />
254+
```
255+
256+
## Validation Checklist
257+
258+
Before submitting content:
259+
260+
- [ ] Frontmatter includes required fields
261+
- [ ] All code examples are complete and functional
262+
- [ ] Platform-specific content uses appropriate includes
263+
- [ ] Links use proper components (`<PlatformLink>` for internal)
264+
- [ ] Content follows established patterns for similar platforms
265+
- [ ] Sidebar navigation order is appropriate
266+
- [ ] All placeholders use standard format (`___PUBLIC_DSN___`)
267+
268+
## Common Anti-Patterns
269+
270+
### ❌ Avoid
271+
272+
```mdx
273+
# Don't repeat boilerplate content
274+
Install Sentry by running: npm install @sentry/node
275+
276+
# Don't use hardcoded links
277+
[Configuration](mdc:https:/docs.sentry.io/platforms/javascript/configuration)
278+
279+
# Don't skip imports in examples
280+
Sentry.init({ dsn: "..." }); // Missing import
281+
```
282+
283+
### ✅ Do
284+
285+
```mdx
286+
# Use shared content for common steps
287+
<PlatformContent includePath="getting-started-install" />
288+
289+
# Use proper link components
290+
<PlatformLink to="/configuration/">Configuration</PlatformLink>
291+
292+
# Include complete examples
293+
import * as Sentry from "@sentry/node";
294+
295+
Sentry.init({ dsn: "___PUBLIC_DSN___" });
296+
```
297+
298+
## Testing Content
299+
300+
1. **Build locally**: Run `npm run dev` to test content rendering
301+
2. **Check navigation**: Verify sidebar placement and ordering
302+
3. **Test links**: Ensure all internal links resolve correctly
303+
4. **Validate components**: Confirm all MDX components render properly
304+
305+
## Version Management
306+
307+
- Use versioned includes for breaking changes: `file__v{version}.mdx`
308+
- Maintain backward compatibility when possible
309+
- Document version-specific differences clearly
310+
- Test across supported SDK versions

apps/changelog/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@radix-ui/react-icons": "^1.3.2",
2626
"@radix-ui/react-toolbar": "^1.1.0",
2727
"@radix-ui/themes": "^3.1.3",
28-
"@sentry/nextjs": "9.10.1",
28+
"@sentry/nextjs": "9.27.0",
2929
"@spotlightjs/spotlight": "^2.1.1",
3030
"next": "15.2.3",
3131
"next-auth": "^4.24.5",
@@ -68,4 +68,4 @@
6868
"@types/react": "npm:types-react@19.0.0-rc.1",
6969
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
7070
}
71-
}
71+
}

develop-docs/development-infrastructure/environment/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ getsentry devserver --workers
113113

114114
**Note**: You **cannot** have both sentry and getsentry devserver running at the same time.
115115

116-
After the server warms up, access it at [http://dev.getsentry.net:8000](http://dev.getsentry.net:8000/). Using localhost won't work. Note that the **http** protocol is used, not **https**. If you encounter a certificate error while accessing it locally, it might be because your browser has remembered that `dev.getsentry.net` previously used the https protocol (possibly while running `yarn dev-ui`) and is now redirecting all http requests to https. To resolve this, open the site in an **incognito window** of your browser.
116+
After the server warms up, access it at [http://dev.getsentry.net:8000](http://dev.getsentry.net:8000/). Using localhost won't work. Note that the **http** protocol is used, not **https**. If you encounter a certificate error while accessing it locally, it might be because your browser has remembered that `dev.getsentry.net` previously used the https protocol (possibly while running `pnpm dev-ui`) and is now redirecting all http requests to https. To resolve this, open the site in an **incognito window** of your browser.
117117

118118
If you need to overwrite configuration options for your local
119119
environment, you can create `getsentry/conf/settings/devlocal.py` and put the

develop-docs/development-infrastructure/frontend-development-server.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_order: 30
88
You have the ability to only run a frontend development server that will proxy all API requests to Sentry's production servers. In order to do so, run the following command:
99

1010
```shell
11-
yarn dev-ui
11+
pnpm dev-ui
1212
```
1313

1414
The development server can be viewed at [https://dev.getsentry.net:7999](https://dev.getsentry.net:7999). `dev.getsentry.net` is an alias for `localhost` and it's preferred because it supports subdomains. You can also create your own domain alias, as with ngrok, if you like.
@@ -32,7 +32,7 @@ You can either grant a temporary exception in your browser, or create and instal
3232

3333
Follow the steps [To Enable HTTPS for your devserver](/development/environment/#enabling-https).
3434

35-
You can now run the dev server with `yarn dev-ui` and open [https://localhost:7999](https://localhost:7999). There should not see a warning about your connection not being private. You should also see a lock or similar icon in the address bar of your browser.
35+
You can now run the dev server with `pnpm dev-ui` and open [https://localhost:7999](https://localhost:7999). There should not see a warning about your connection not being private. You should also see a lock or similar icon in the address bar of your browser.
3636

3737
![lock icon in address bar](../img/addressBarLockIcon.png)
3838

develop-docs/frontend/component-library.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The Component Library is implemented as a webpage inside the main sentry applica
2121
Log in and then visit [`/stories/`](https://sentry.io/orgredirect/organizations/:orgslug/stories/) on your existing Sentry Org. This works the same on sentry.io or for self-hosted installations.
2222

2323
- **Dev Access**<br />
24-
Whether you are using `yarn dev-ui` to start a development server, or `sentry devserver` to spin up all the services locally, you can access the Component Library by logging in and changing the path from `/issues/` (the default landing page) to `/stories/`.
24+
Whether you are using `pnpm dev-ui` to start a development server, or `sentry devserver` to spin up all the services locally, you can access the Component Library by logging in and changing the path from `/issues/` (the default landing page) to `/stories/`.
2525

2626
## Ownership
2727

develop-docs/frontend/upgrade-policies.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ For example, some dependencies such as `webpack` fall both into the app build **
149149

150150
- Does `sentry devserver` still correctly run the client-side application?
151151

152-
- Does `yarn dev-ui` still run the client-only version of the application?
152+
- Does `pnpm dev-ui` still run the client-only version of the application?
153153

154154
Depending on what package you’re upgrading, you’ll what to consider what to test. For example, if you upgraded `fork-ts-checker-webpack-plugin` you’ll want to validate that types are still being checked in development.
155155

develop-docs/frontend/working-on-getting-started-docs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ The structure for the documentation is built on React and follows the following
4747
1. Locate the language folder within [gettingStartedDocs](https://github.com/getsentry/sentry/tree/master/static/app/gettingStartedDocs).
4848
2. Update the file `index.tsx` with the necessary changes.
4949
3. You might need to update the tests present in the file `index.spec.tsx`
50-
4. Finally, before concluding, please run Sentry locally or use the command `yarn dev-ui` [Frontend Development Server](https://develop.sentry.dev/frontend/development-server/) and perform a manual test to ensure that the getting started documentation renders correctly in both the onboarding process of a new organization and in the project creation flow. This step is essential for verifying the proper functioning and visual appearance of the documentation.
50+
4. Finally, before concluding, please run Sentry locally or use the command `pnpm dev-ui` [Frontend Development Server](https://develop.sentry.dev/frontend/development-server/) and perform a manual test to ensure that the getting started documentation renders correctly in both the onboarding process of a new organization and in the project creation flow. This step is essential for verifying the proper functioning and visual appearance of the documentation.
5151

5252
### Framework
5353

5454
1. Locate the framework's language folder within [gettingStartedDocs](https://github.com/getsentry/sentry/tree/master/static/app/gettingStartedDocs).
5555
2. Within the folder, find the file named after the framework's slug and update it with the necessary changes.
5656
3. You might need to update the tests present in the file named after the framework’s slug with the extension `.spec.tsx`
57-
4. Finally, before concluding, please run Sentry locally or use the command `yarn dev-ui` and perform a manual test to ensure that the getting started documentation renders correctly in both the onboarding process of a new organization and in the project creation flow. This step is essential for verifying the proper functioning and visual appearance of the documentation.
57+
4. Finally, before concluding, please run Sentry locally or use the command `pnpm dev-ui` and perform a manual test to ensure that the getting started documentation renders correctly in both the onboarding process of a new organization and in the project creation flow. This step is essential for verifying the proper functioning and visual appearance of the documentation.
5858

5959
## Notes
6060

0 commit comments

Comments
 (0)