Skip to content

Commit e2d3a73

Browse files
authored
Merge branch 'master' into aspnetcore-6
2 parents 3011b66 + 5167542 commit e2d3a73

File tree

985 files changed

+15077
-8116
lines changed

Some content is hidden

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

985 files changed

+15077
-8116
lines changed

.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: 4 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
@@ -36,14 +36,13 @@ jobs:
3636
${{ github.workspace }}/node_modules
3737
${{ github.workspace }}/.next/cache
3838
${{ github.workspace }}/.eslintcache
39-
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
39+
key: node-${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('**/yarn.lock') }}
4040
restore-keys: |
41-
node-${{ runner.os }}-
41+
node-${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-
4242
4343
- run: yarn install --frozen-lockfile
44-
if: steps.cache.outputs.cache-hit != 'true'
4544

46-
- run: yarn build
45+
- run: yarn next build
4746
if: steps.filter.outputs.docs == 'true'
4847
env:
4948
SENTRY_DSN: https://[email protected]/0

.github/workflows/test.yml

Lines changed: 11 additions & 3 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
@@ -62,11 +62,19 @@ jobs:
6262
with:
6363
github-token: ${{ steps.token.outputs.token }}
6464

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+
6573
job_test:
6674
name: Test
6775
runs-on: ubuntu-latest
6876
steps:
69-
- uses: actions/checkout@v4.1.1
77+
- uses: actions/checkout@v5
7078
- name: Set up Node
7179
uses: actions/setup-node@v4
7280
with:

.gitignore

Lines changed: 5 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/
@@ -96,6 +97,8 @@ tsconfig.tsbuildinfo
9697
# Ignore generated files
9798
/public/md-exports/
9899
public/mdx-images/*
100+
public/og-images/*
101+
!public/og-images/README.md
99102

100103
# yalc
101104
.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: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,47 @@ function formatCanonicalTag(tag: string) {
194194
return tag;
195195
}
196196

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+
197232
export async function generateMetadata(props: MetadataProps): Promise<Metadata> {
198233
const params = await props.params;
199234
const domain = isDeveloperDocs
200235
? 'https://develop.sentry.dev'
201236
: 'https://docs.sentry.io';
202-
// enable og iamge preview on preview deployments
237+
// enable og image preview on preview deployments
203238
const previewDomain = process.env.VERCEL_URL
204239
? `https://${process.env.VERCEL_URL}`
205240
: domain;
@@ -208,12 +243,8 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
208243
let customCanonicalTag: string = '';
209244
let description =
210245
'Self-hosted and cloud-based application performance monitoring & error tracking that helps software teams see clearer, solve quicker, and learn continuously.';
211-
// show og image on the home page only
212-
const images =
213-
((await props.params).path ?? []).length === 0
214-
? [{url: `${previewDomain ?? domain}/og.png`, width: 1200, height: 630}]
215-
: [];
216246

247+
let ogImageUrl: string | null = null;
217248
let noindex: undefined | boolean = undefined;
218249

219250
const rootNode = await getDocsRootNode();
@@ -236,9 +267,25 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
236267
}
237268

238269
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+
}
239279
}
240280
}
241281

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

develop-docs/application-architecture/dynamic-sampling/architecture.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Architecture
33
sidebar_order: 3
4+
og_image: /og-images/application-architecture-dynamic-sampling-architecture.png
45
---
56

67
The architecture that powers Dynamic Sampling is composed of several components that work together to get the organization's sample rate closer to the target fidelity.

develop-docs/application-architecture/dynamic-sampling/fidelity-and-biases.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Fidelity and Biases
33
sidebar_order: 2
4+
og_image: /og-images/application-architecture-dynamic-sampling-fidelity-and-biases.png
45
---
56

67
Dynamic Sampling allows Sentry to automatically adjust the amount of data retained based on how valuable the data is to the user. This is technically achieved by applying a **sample rate** to every event, which is determined by a **set of rules** that are evaluated for each event.

develop-docs/application-architecture/dynamic-sampling/index.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
---
22
title: Dynamic Sampling
3-
description: Dynamic Sampling is a feature of the ingestion pipeline that allows Sentry to automatically adjust the amount of data retained based on the value of the data.
3+
description: >-
4+
Dynamic Sampling is a feature of the ingestion pipeline that allows Sentry to
5+
automatically adjust the amount of data retained based on the value of the
6+
data.
47
sidebar_order: 50
8+
og_image: /og-images/application-architecture-dynamic-sampling.png
59
---
610

711
From all the data received by the SDKs, Sentry is able to extract low-granularity information through metrics, while Dynamic Sampling makes the decision of whether to keep or drop data.

0 commit comments

Comments
 (0)