Skip to content

Commit 6dbafd7

Browse files
Merge branch 'master' into InterstellarStella-patch-1
2 parents 3fd3bb4 + 0d9595a commit 6dbafd7

File tree

1,718 files changed

+41735
-14522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,718 files changed

+41735
-14522
lines changed

.babelrc.js.bak

Lines changed: 0 additions & 16 deletions
This file was deleted.

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55

66
NEXT_PUBLIC_ALGOLIA_APP_ID=
77
NEXT_PUBLIC_ALGOLIA_SEARCH_KEY=
8+
NEXT_PUBLIC_SENTRY_DSN=

.github/workflows/lint-404s.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [master]
88

99
jobs:
10-
index:
10+
lint-404:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
@@ -32,13 +32,17 @@ jobs:
3232
- uses: actions/cache@v4
3333
id: cache
3434
with:
35-
path: ${{ github.workspace }}/node_modules
36-
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
35+
path: |
36+
${{ github.workspace }}/node_modules
37+
${{ github.workspace }}/.next/cache
38+
${{ github.workspace }}/.eslintcache
39+
key: node-${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('**/yarn.lock') }}
40+
restore-keys: |
41+
node-${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-
3742
3843
- run: yarn install --frozen-lockfile
39-
if: steps.cache.outputs.cache-hit != 'true'
4044

41-
- run: yarn build
45+
- run: yarn next build
4246
if: steps.filter.outputs.docs == 'true'
4347
env:
4448
SENTRY_DSN: https://[email protected]/0

.github/workflows/test.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint, and Test
1+
name: CI
22

33
on:
44
push:
@@ -11,7 +11,7 @@ jobs:
1111
name: Lint
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4.1.1
14+
- uses: actions/checkout@v5
1515

1616
- name: Internal github app token
1717
id: token
@@ -29,18 +29,23 @@ jobs:
2929
- uses: actions/cache@v4
3030
id: cache
3131
with:
32-
path: ${{ github.workspace }}/node_modules
32+
path: |
33+
${{ github.workspace }}/node_modules
34+
${{ github.workspace }}/.next/cache
35+
${{ github.workspace }}/.eslintcache
3336
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
37+
restore-keys: |
38+
node-${{ runner.os }}-
39+
3440
- run: yarn install --frozen-lockfile
3541
if: steps.cache.outputs.cache-hit != 'true'
3642

3743
# Additional checks
3844
- run: yarn lint:ts
39-
- run: yarn lint:docs
4045

4146
# Run automatic fixes (run prettier apart from eslint to also fix mdx files)
4247
- run: yarn lint:prettier:fix
43-
- run: yarn lint:eslint:fix
48+
- run: yarn lint:eslint:fix --cache
4449

4550
# Check (and error) for dirty working tree for forks
4651
# Reason being we need a different token to auto commit changes and
@@ -57,20 +62,34 @@ jobs:
5762
with:
5863
github-token: ${{ steps.token.outputs.token }}
5964

65+
job_typos:
66+
name: Check Typos
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v5
70+
- name: Check spelling with typos
71+
uses: crate-ci/typos@master
72+
6073
job_test:
6174
name: Test
6275
runs-on: ubuntu-latest
6376
steps:
64-
- uses: actions/checkout@v4.1.1
77+
- uses: actions/checkout@v5
6578
- name: Set up Node
6679
uses: actions/setup-node@v4
6780
with:
6881
node-version-file: 'package.json'
6982
- uses: actions/cache@v4
7083
id: cache
7184
with:
72-
path: ${{ github.workspace }}/node_modules
85+
path: |
86+
${{ github.workspace }}/node_modules
87+
${{ github.workspace }}/.next/cache
88+
${{ github.workspace }}/.eslintcache
7389
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
90+
restore-keys: |
91+
node-${{ runner.os }}-
92+
7493
- run: yarn install --frozen-lockfile
7594
if: steps.cache.outputs.cache-hit != 'true'
7695
- name: Run Tests

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ typings/
5050
# Output of 'npm pack'
5151
*.tgz
5252

53-
# dotenv environment variables file
53+
# dotenv environment variables files
5454
.env
55-
.env.development
55+
.env.*
56+
!.env.example
5657

5758
# gatsby files
5859
.cache/
@@ -93,7 +94,11 @@ public/page-data
9394
# tsbuildinfo file generated by CI
9495
tsconfig.tsbuildinfo
9596

97+
# Ignore generated files
98+
/public/md-exports/
9699
public/mdx-images/*
100+
public/og-images/*
101+
!public/og-images/README.md
97102

98103
# yalc
99104
.yalc

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ repos:
2222
- id: debug-statements
2323
- id: flake8
2424
- id: fix-encoding-pragma
25-
args: ["--remove"]
25+
args: ['--remove']
2626
- repo: https://github.com/getsentry/pre-commit-hooks
2727
rev: f3237d2d65af81d435c49dee3593dc8f03d23c2d
2828
hooks:
2929
- id: prettier
3030
entry: node_modules/.bin/prettier
3131
- id: eslint
3232
entry: node_modules/.bin/eslint
33+
- repo: https://github.com/crate-ci/typos
34+
rev: v1.39.0
35+
hooks:
36+
- id: typos

_typos.toml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
[default]
2+
# Regex patterns to ignore
3+
extend-ignore-re = [
4+
"\\bUE\\b", # Unreal Engine abbreviation
5+
"\\bUE_LOG\\b", # Unreal Engine logging macro
6+
"\\bue4\\b", # Unreal Engine 4
7+
"\\bue5\\b", # Unreal Engine 5
8+
"\\bue\\d+\\b", # Any UE version (ue5, ue6, etc.)
9+
]
10+
11+
[files]
12+
# Files and patterns to exclude from spell checking
13+
extend-exclude = [
14+
# Design and binary files
15+
"*.excalidraw", # Diagram files contain random IDs
16+
"*.png",
17+
"*.jpg",
18+
"*.jpeg",
19+
"*.gif",
20+
"*.svg",
21+
"*.webp",
22+
23+
# Data and configuration files
24+
"*.json", # JSON files have many false positives
25+
"*.lock", # Package lock files
26+
"yarn.lock", # Yarn lock file
27+
"package-lock.json", # NPM lock file
28+
29+
# Documentation assets
30+
"public/_platforms/*.json", # Platform metadata
31+
"public/pdfs/*.pdf", # PDFs can't be edited programmatically
32+
33+
# Build artifacts and dependencies
34+
".next/**", # Next.js build output
35+
"node_modules/**", # Dependencies
36+
"dist/**", # Distribution builds
37+
"build/**", # Build output
38+
]
39+
40+
[default.extend-words]
41+
# Technical terms and product names that are spelled correctly
42+
# .NET ecosystem
43+
Paket = "Paket" # .NET package manager (legitimate tool)
44+
paket = "paket" # .NET package manager CLI command
45+
46+
# Platform-specific terms
47+
ITMS = "ITMS" # Apple error code prefix (legitimate)
48+
SEH = "SEH" # Structured Exception Handling (Windows API)
49+
EDE = "EDE" # Cipher name component (3DES_EDE_CBC_SHA)
50+
UE = "UE" # Unreal Engine abbreviation
51+
UE4 = "UE4" # Unreal Engine 4
52+
UE5 = "UE5" # Unreal Engine 5
53+
54+
# Cloud/Infrastructure
55+
nodejs_als = "nodejs_als" # Cloudflare compatibility flag (correct spelling)
56+
als = "als" # Part of nodejs_als flag
57+
58+
# Common abbreviations in tech docs
59+
DSN = "DSN" # Data Source Name (Sentry)
60+
DSNs = "DSNs" # Plural
61+
SDK = "SDK" # Software Development Kit
62+
SDKs = "SDKs" # Plural
63+
API = "API" # Application Programming Interface
64+
APIs = "APIs" # Plural
65+
MCP = "MCP" # Model Context Protocol
66+
NPM = "NPM" # Node Package Manager
67+
68+
# Code identifiers that are intentionally "misspelled" or match external systems
69+
# Note: These should ONLY include cases where the spelling is intentional
70+
# (e.g., matching an external API/constant name we don't control)
71+
childs = "childs" # Intentional variable name in mdx-deflist.ts
72+
aso = "aso" # Intentional variable name in utils.ts (short for "a sidebar order")
73+
MIGRATED_GETTING_STARTD_DOCS = "MIGRATED_GETTING_STARTD_DOCS" # Matches actual constant in Sentry backend (external)
74+
STARTD = "STARTD" # Part of MIGRATED_GETTING_STARTD_DOCS - needed because typos parses words in markdown text
75+
ERRO = "ERRO" # Special case - Part of "ERRORs" in legacy-sdk/integrations.mdx (logging level context)

app/[[...path]]/page.tsx

Lines changed: 61 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ export const dynamic = 'force-static';
4747
const mdxComponentsWithWrapper = mdxComponents(
4848
{Include, PlatformContent},
4949
({children, frontMatter, nextPage, previousPage}) => (
50-
<DocPage frontMatter={frontMatter} nextPage={nextPage} previousPage={previousPage}>
50+
<DocPage
51+
frontMatter={frontMatter}
52+
nextPage={nextPage}
53+
previousPage={previousPage}
54+
fullWidth={frontMatter.fullWidth}
55+
>
5156
{children}
5257
</DocPage>
5358
)
@@ -189,26 +194,57 @@ function formatCanonicalTag(tag: string) {
189194
return tag;
190195
}
191196

197+
// Helper function to resolve OG image URLs
198+
function resolveOgImageUrl(
199+
imageUrl: string | undefined,
200+
domain: string,
201+
pagePath: string[]
202+
): string | null {
203+
if (!imageUrl) {
204+
return null;
205+
}
206+
207+
// Remove hash fragments (e.g., #600x400 from remark-image-size)
208+
const cleanUrl = imageUrl.split('#')[0];
209+
210+
// External URLs - return as is
211+
if (cleanUrl.startsWith('http://') || cleanUrl.startsWith('https://')) {
212+
return cleanUrl;
213+
}
214+
215+
// Absolute paths (public folder)
216+
if (cleanUrl.startsWith('/')) {
217+
return `${domain}${cleanUrl}`;
218+
}
219+
220+
// Relative paths - resolve based on page path
221+
if (cleanUrl.startsWith('./')) {
222+
const relativePath = cleanUrl.slice(2); // Remove './'
223+
const pageDir = pagePath.join('/');
224+
return `${domain}/${pageDir}/${relativePath}`;
225+
}
226+
227+
// Default case: treat as relative to page
228+
const pageDir = pagePath.join('/');
229+
return `${domain}/${pageDir}/${cleanUrl}`;
230+
}
231+
192232
export async function generateMetadata(props: MetadataProps): Promise<Metadata> {
193233
const params = await props.params;
194234
const domain = isDeveloperDocs
195235
? 'https://develop.sentry.dev'
196236
: 'https://docs.sentry.io';
197-
// enable og iamge preview on preview deployments
237+
// enable og image preview on preview deployments
198238
const previewDomain = process.env.VERCEL_URL
199239
? `https://${process.env.VERCEL_URL}`
200240
: domain;
201241
let title =
202-
'Sentry Docs | Application Performance Monitoring &amp; Error Tracking Software';
242+
'Sentry Docs | Application Performance Monitoring & Error Tracking Software';
203243
let customCanonicalTag: string = '';
204244
let description =
205-
'Self-hosted and cloud-based application performance monitoring &amp; error tracking that helps software teams see clearer, solve quicker, &amp; learn continuously.';
206-
// show og image on the home page only
207-
const images =
208-
((await props.params).path ?? []).length === 0
209-
? [{url: `${previewDomain ?? domain}/og.png`, width: 1200, height: 630}]
210-
: [];
245+
'Self-hosted and cloud-based application performance monitoring & error tracking that helps software teams see clearer, solve quicker, and learn continuously.';
211246

247+
let ogImageUrl: string | null = null;
212248
let noindex: undefined | boolean = undefined;
213249

214250
const rootNode = await getDocsRootNode();
@@ -231,9 +267,25 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
231267
}
232268

233269
noindex = pageNode.frontmatter.noindex;
270+
271+
// Check for manual OG image override in frontmatter
272+
if (pageNode.frontmatter.og_image) {
273+
ogImageUrl = resolveOgImageUrl(
274+
pageNode.frontmatter.og_image,
275+
previewDomain ?? domain,
276+
params.path
277+
);
278+
}
234279
}
235280
}
236281

282+
// Default fallback
283+
if (!ogImageUrl) {
284+
ogImageUrl = `${previewDomain ?? domain}/og.png`;
285+
}
286+
287+
const images = [{url: ogImageUrl, width: 1200, height: 630}];
288+
237289
const canonical = customCanonicalTag
238290
? domain + customCanonicalTag
239291
: params.path

app/globals.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,18 @@ body {
165165
{
166166
color: rgb(134, 142, 150) !important;
167167
}
168+
169+
/* CSS Counters for Onboarding Steps */
170+
.onboarding-steps {
171+
counter-reset: onboarding-step;
172+
}
173+
174+
.onboarding-step {
175+
counter-increment: onboarding-step;
176+
}
177+
178+
.onboarding-step .step-heading::before,
179+
.onboarding-step h2::before {
180+
content: 'Step ' counter(onboarding-step) ': ';
181+
font-weight: inherit;
182+
}

app/sitemap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {getDevDocsFrontMatter, getDocsFrontMatter} from 'sentry-docs/mdx';
55

66
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
77
if (isDeveloperDocs) {
8-
const docs = getDevDocsFrontMatter();
8+
const docs = await getDevDocsFrontMatter();
99
const baseUrl = 'https://develop.sentry.dev';
1010
return docsToSitemap(docs, baseUrl);
1111
}

0 commit comments

Comments
 (0)