Skip to content

Commit b58ee1d

Browse files
authored
Merge branch 'master' into sdybskiy/logs-attribute-value-types
2 parents e60aaef + e8395a7 commit b58ee1d

71 files changed

Lines changed: 1040 additions & 1294 deletions

File tree

Some content is hidden

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

.claude/skills/technical-docs/SKILL.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,68 @@ Link to related docs rather than repeating content:
130130
For automatic tracing, see <PlatformLink to="/configuration/apis/">API Reference</PlatformLink>.
131131
```
132132

133-
### Code Block Filenames
133+
### Code Block Meta Flags
134134

135135
Always include filename when showing file-specific code:
136136
```tsx {filename:app/error.tsx}
137137
```
138138

139+
Consecutive fenced code blocks are automatically grouped into tabbed code snippets.
140+
Each tab can have a title and filename:
141+
142+
~~~
143+
```swift {tabTitle:Swift}
144+
SentrySDK.capture(error: error)
145+
```
146+
147+
```objc {tabTitle:Objective-C}
148+
[SentrySDK captureError:error];
149+
```
150+
~~~
151+
152+
#### Markdown Export and `{mdExpandTabs}`
153+
154+
The `.md` export (mainly used by LLMs via the "Copy page" button) **collapses tab groups
155+
by default**: only the first tab is included, with a note listing the other tabs
156+
(e.g. *Other available variations of the above snippet: yarn, pnpm*). This keeps context lean when tabs show
157+
trivial variations an LLM can infer on its own.
158+
159+
Add `{mdExpandTabs}` to the first code fence in a group when the tabs contain code an LLM
160+
**cannot reliably derive** from seeing just one tab. This is rare — most times, adding only
161+
one tab to the produced `.md` is enough.
162+
163+
~~~
164+
```swift {tabTitle:Swift} {mdExpandTabs}
165+
SentrySDK.start { options in
166+
options.dsn = "..."
167+
}
168+
```
169+
170+
```objc {tabTitle:Objective-C}
171+
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
172+
options.dsn = @"...";
173+
}];
174+
```
175+
~~~
176+
177+
**Expand** — the code is too different for an LLM to infer:
178+
- Different languages: Swift / Objective-C, cross-language guides (JS/Python/PHP/Ruby/...)
179+
- Different setup flows: Hono guide init (Cloudflare vs Node.js `--import` vs Bun)
180+
- Different APIs or wrappers: GCP Cloud Functions (`wrapHttpFunction` vs `wrapCloudEventFunction`), serverless async/sync handlers
181+
- Different framework versions with distinct imports: Spring 5/6/7, Spring Boot 2/3/4, Svelte v5+ / v3
182+
- Client / Server splits: Next.js, Remix, React Router (Replay + browser tracing vs Node integrations)
183+
- Different platform tooling: KMP (`commonMain` / `iosApp` / `androidApp`), Flutter navigation (Navigator / GoRouter / AutoRoute)
184+
- Install methods with different patterns: npm (`import`) vs CDN (`<script>`) vs Loader (`sentryOnLoad`)
185+
- SDK version migration: SDK 2.x vs 1.x when APIs differ
186+
187+
**Collapse** (default) — an LLM can figure it out from one tab:
188+
- Package managers: npm / yarn / pnpm, pip / uv, .NET CLI / NuGet
189+
- Module format: ESM / CommonJS (same API, different import syntax)
190+
- Config file formats: JSON / TOML, properties / yml
191+
- Java / Kotlin on the same platform (same APIs, syntactic sugar differences)
192+
- Runtime tabs where only the import path changes (e.g. `@sentry/hono/cloudflare` vs `@sentry/hono/node` in `platform-includes/` snippets)
193+
- Build tools when only dependency declaration syntax differs: Gradle / Maven / SBT
194+
139195
## Review Checklist
140196

141197
When reviewing documentation:

develop-docs/backend/application-domains/tasks/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def test_schedule_task(self, mock_deliver: MagicMock) -> None:
342342
mock_deliver.delay.assert_called_with(webhook_one.id)
343343
```
344344

345-
<Alert type="warning">
345+
<Alert level="warning">
346346
Mocking tasks will not validate that parameters are JSON compatible, nor will it catch TypeErrors from signature mismatches.
347347
</Alert>
348348

develop-docs/development-infrastructure/testing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ with in_test_hide_transaction_boundary():
285285
users = user_service.get_many(filter={"user_ids": list(owners)})
286286
```
287287

288-
<Alert type="warning">
288+
<Alert level="warning">
289289
Bypassing safety checks is not recommended and usage can cause consistency
290290
issues and data loss.
291291
</Alert>

develop-docs/sdk/foundations/client/data-collection/index.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,22 @@ init({
144144
})
145145
```
146146

147+
#### URLs
148+
149+
URL strings in span descriptions follow the format defined in [Structuring Data](/sdk/telemetry/traces/structuring-data/): `METHOD scheme://host/path` — query strings and fragments are excluded.
150+
151+
The `queryParams` option controls query parameter filtering wherever query strings appear — including `url.full`, `url.query`, and [`request.query_string`](/sdk/foundations/envelopes/event-payloads/request/). `url.path` and the span description are unaffected since they never contain query strings. For general data scrubbing rules (variable size limits, structuring for server-side scrubbing), see [Data Scrubbing](/sdk/foundations/data-scrubbing/).
152+
153+
**Example:** Given a request to `https://example.com/api/users?token=abc123&page=5`:
154+
155+
| Attribute | `queryParams` enabled | `queryParams` off |
156+
|---|---|---|
157+
| Span description | `GET https://example.com/api/users` | same |
158+
| `url.full` | `https://example.com/api/users?token=[Filtered]&page=5` | `https://example.com/api/users` |
159+
| `url.path` | `/api/users` | same |
160+
| `url.query` | `token=[Filtered]&page=5` | not collected |
161+
| `request.query_string` | `token=[Filtered]&page=5` | not collected |
162+
147163
#### Cookies and Query Params
148164

149165
Cookies and query params may arrive as a single unparsed string (e.g., `Cookie: user_session=abc; theme=dark-mode`) rather than pre-split key-value pairs. SDKs **MAY** handle both cases:

develop-docs/sdk/foundations/data-scrubbing.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The normative rules for sensitive data, PII, cookies, request bodies, and user-s
1818
- SDKs should not include PII or other sensitive data in the payload by default. The legacy option [_send-default-pii_](https://docs.sentry.io/platforms/python/configuration/options/#send-default-pii) is **disabled by default**; the replacement is `dataCollection.includeUserInfo` and `dataCollection.collect` (see [Data Collection](/sdk/foundations/client/data-collection/)).
1919
- Certain sensitive data must never be sent through SDK instrumentation: header/cookie/query values matching the default denylist are replaced with `"[Filtered]"`. User-set data is always attached; only automatically gathered data is scrubbed. Users can use `beforeSend` / event processors to remove or redact any data.
2020
- For the exact default denylist (partial, case-insensitive match), PII denylist (`x-forwarded-`, `-user`), cookies when unparsable, and raw request bodies, see [Data Collection — Default Denylist](/sdk/foundations/client/data-collection/#default-denylist) and [User-Set Data and Scrubbing](/sdk/foundations/client/data-collection/#user-set-data-scrubbing).
21+
- For how `queryParams` filtering applies to URL attributes, see [Data Collection — URLs](/sdk/foundations/client/data-collection/#urls).
2122

2223
### Application State
2324

docs/cli/snapshots.mdx

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -58,40 +58,7 @@ If you only upload a subset of your snapshots per CI run — for example, becaus
5858
sentry-cli build snapshots ./snapshots --app-id web-frontend --selective
5959
```
6060

61-
When an upload is marked as selective, Sentry only diffs the snapshots you uploaded. Any snapshot that exists in the base build but was not included in the upload is treated as unchanged (skipped) rather than removed.
62-
63-
### Detecting Removals and Renames in Selective Mode
64-
65-
By default, `--selective` cannot detect removals or renames because Sentry cannot distinguish a deliberately deleted snapshot from one that was not part of the subset. To enable removal and rename detection, pass the full list of image file names from your test suite using one of:
66-
67-
- `--all-image-file-names <NAMES>` — a comma-separated list of all image file names.
68-
- `--all-image-file-names-file <PATH>` — a path to a file (`.txt`, `.csv`, etc.) containing all image file names, one per line.
69-
- `--all-image-file-names-as-regex <PATTERNS>` — a comma-separated list of regex patterns matching all image file names.
70-
- `--all-image-file-names-as-regex-file <PATH>` — a path to a file containing regex patterns, one per line.
71-
72-
<Alert level="warning">
73-
These four flags are mutually exclusive — you can only use one per upload.
74-
</Alert>
75-
76-
All four flags implicitly enable `--selective`.
77-
78-
```bash
79-
# Literal names
80-
sentry-cli build snapshots ./snapshots \
81-
--app-id web-frontend \
82-
--all-image-file-names "homepage.png,settings/profile.png,settings/billing.png"
83-
84-
# Regex patterns
85-
sentry-cli build snapshots ./snapshots \
86-
--app-id web-frontend \
87-
--all-image-file-names-as-regex ".*\.png"
88-
```
89-
90-
With the image names or patterns provided, Sentry can tell apart three categories of missing images:
91-
92-
- **Skipped** — matched by the list/pattern but not uploaded (part of the test suite, just not run in this CI job).
93-
- **Removed** — not matched and not uploaded (deliberately deleted from the test suite).
94-
- **Renamed** — a new image has the same content hash as a missing one.
61+
When an upload is marked as selective, Sentry only diffs the snapshots you uploaded. Any snapshot that exists in the base build but was not included in the upload is treated as unchanged rather than removed. Removals and renames cannot be detected when using `--selective`, because Sentry cannot distinguish a deliberately deleted snapshot from one that was not part of the subset.
9562

9663
## Diff Threshold
9764

@@ -116,12 +83,8 @@ sentry-cli build snapshots [OPTIONS] --app-id <APP_ID> <PATH>
11683
| `--auth-token <TOKEN>` | Sentry auth token. Can also be set via `SENTRY_AUTH_TOKEN`. |
11784
| `-o`, `--org <ORG>` | Sentry organization slug. Can also be set via `SENTRY_ORG`. |
11885
| `-p`, `--project <PROJECT>` | Sentry project slug. Can also be set via `SENTRY_PROJECT`. |
119-
| `--selective` | Mark the upload as a subset. Use when uploading only a portion of your snapshots (for example, affected tests only). |
120-
| `--all-image-file-names <NAMES>` | Comma-separated list of all image file names in the full test suite. Enables removal and rename detection in selective mode. Implicitly enables `--selective`. Mutually exclusive with the other `--all-image-*` flags. |
121-
| `--all-image-file-names-file <PATH>` | Path to a file (`.txt`, `.csv`, etc.) containing all image file names, one per line. Enables removal and rename detection in selective mode. Implicitly enables `--selective`. Mutually exclusive with the other `--all-image-*` flags. |
122-
| `--all-image-file-names-as-regex <PATTERNS>` | Comma-separated list of regex patterns matching all image file names in the full test suite. Enables removal and rename detection in selective mode. Implicitly enables `--selective`. Mutually exclusive with the other `--all-image-*` flags. |
123-
| `--all-image-file-names-as-regex-file <PATH>` | Path to a file containing regex patterns matching all image file names, one per line. Enables removal and rename detection in selective mode. Implicitly enables `--selective`. Mutually exclusive with the other `--all-image-*` flags. |
124-
| `--diff-threshold <THRESHOLD>` | Float between `0.0` and `1.0`. Sentry only reports images as changed if the percentage of changed pixels exceeds this value. |
86+
| `--selective` | Mark the upload as a subset. Use when uploading only a portion of your snapshots (for example, affected tests only). |
87+
| `--diff-threshold <THRESHOLD>` | Float between `0.0` and `1.0`. Sentry only reports images as changed if the percentage of changed pixels exceeds this value. |
12588
| `--head-sha <SHA>` | Commit SHA for the upload. Auto-detected in CI. |
12689
| `--base-sha <SHA>` | Base commit SHA for comparison (PR only). Auto-detected from merge-base. |
12790
| `--vcs-provider <PROVIDER>` | VCS provider (for example, `github`). Auto-detected from the git remote. |

docs/contributing/approach/sdk-docs/write-getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ noindex: true
44
sidebar_order: 30
55
---
66

7-
<Alert type="info">
7+
<Alert level="info">
88
This page describes the legacy "Getting Started" guide format. New SDKs and
99
guides that have been updated should use the [Quick Start guide
1010
format](/contributing/approach/sdk-docs/write-quick-start/).

docs/contributing/approach/sdk-docs/write-quick-start.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_order: 25
66

77
New SDKs should use the Quick Start guide format outlined on this page. You may still encounter Getting Started guides for existing SDKs.
88

9-
<Alert type="info" title="Note">
9+
<Alert level="info" title="Note">
1010
If you want to update an existing Getting Started Guide without refactoring it
1111
into a Quick Start guide, see [How to Write - Getting
1212
Started](/contributing/approach/sdk-docs/write-getting-started/). If you're
@@ -133,7 +133,7 @@ If the content you want to include doesn't already exist, create a new file for
133133

134134
Integrate this content into your guide using the `PlatformSection` component.
135135

136-
<Alert type="info">
136+
<Alert level="info">
137137
If the SDK supports performance monitoring, add it to the list that links back
138138
into the SDK content from Product, stored in
139139
[`/docs/product/dashboards/sentry-dashboards/index.mdx`](https://github.com/getsentry/sentry-docs/blob/master/docs/product/dashboards/sentry-dashboards/index.mdx) (Sentry Dashboards index, which includes a Set Up section and platform redirect to tracing).

docs/organization/data-storage-location/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ Here’s a list of the types of data that will be stored in whichever data stora
2727

2828
- Error events, activity, and issue links
2929
- Transactions
30+
- Spans
3031
- Profiles
32+
- Logs
33+
- Metrics
3134
- Release health
3235
- Releases, debug symbols, and source maps
3336
- Debug symbol metadata and source map metadata
@@ -103,7 +106,10 @@ If you have a self-hosted Sentry account, you can [follow these instructions](/c
103106

104107
- Error events, activity, and issue links
105108
- Transactions
109+
- Spans
106110
- Profiles
111+
- Logs
112+
- Metrics
107113
- Session Replays
108114
- Cron check-ins
109115
- Uptime checks

docs/platforms/apple/guides/ios/size-analysis/insights.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Below are a list of available insights for iOS builds, followed by more details
3434

3535
**How to fix**: Strip symbols from release builds and instead use debug symbols in separate dSYM files for crash reporters.
3636

37-
<Alert type="warning">
37+
<Alert level="warning">
3838
Stripping symbols before creating a dSYM breaks crash symbolication. Confirm
3939
your release build still produces and uploads dSYMs (or another crash reporter
4040
has them) before stripping.
@@ -50,7 +50,7 @@ strip -rSTx AppBinary -o AppBinaryStripped
5050

5151
To automate stripping in your project after building, add a Run Script phase that skips non-release builds and leaves Apple-signed frameworks untouched:
5252

53-
<Alert type="warning">
53+
<Alert level="warning">
5454
This script will strip the main app binary along with any binaries in the
5555
`Frameworks/` directory. This is a sample script that **may require
5656
adjustments** for your project.
@@ -304,7 +304,7 @@ Xcode now limits the export trie to just that allowlist.
304304

305305
**How to fix**: Enable [Source maps](https://reactnative.dev/docs/debugging-release-builds) when building your release app.
306306

307-
<Alert type="warning">
307+
<Alert level="warning">
308308
Stripping debug information breaks crash symbolication. Source maps need to be
309309
uploaded separately to your crash reporter.
310310
</Alert>

0 commit comments

Comments
 (0)