Skip to content

Commit 98b326f

Browse files
authored
Merge branch 'master' into ivana/remove-warden
2 parents 34db882 + 68313e1 commit 98b326f

File tree

9 files changed

+3350
-0
lines changed

9 files changed

+3350
-0
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Auto-generated codebase documentation
2+
docs/codebase/** linguist-generated=true
3+
4+
.github/workflows/*.lock.yml linguist-generated=true merge=ours

.github/aw/actions-lock.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v8": {
4+
"repo": "actions/github-script",
5+
"version": "v8",
6+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
7+
},
8+
"github/gh-aw/actions/setup@v0.57.2": {
9+
"repo": "github/gh-aw/actions/setup",
10+
"version": "v0.57.2",
11+
"sha": "32b3a711a9ee97d38e3989c90af0385aff0066a7"
12+
}
13+
}
14+
}

.github/workflows/docs-codebase-refresh.lock.yml

Lines changed: 1273 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
name: docs-codebase-refresh
3+
description: Full refresh of SDK codebase documentation (manual trigger only)
4+
engine: claude
5+
on:
6+
workflow_dispatch:
7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
network: defaults
11+
safe-outputs:
12+
create-pull-request:
13+
add-labels:
14+
---
15+
16+
# Full Codebase Documentation Refresh
17+
18+
You are a documentation agent for the Sentry Python SDK. Your job is to
19+
generate comprehensive, accurate codebase-style documentation for every module
20+
and integration in the SDK.
21+
22+
## SDK Context
23+
24+
- Language: Python
25+
- Package: `sentry_sdk`
26+
- Integration location: `sentry_sdk/integrations/`
27+
- Test location: `tests/integrations/`
28+
- Integration registry: `sentry_sdk/integrations/__init__.py` (`_MIN_VERSIONS` dict)
29+
- Auto-enabling list: `sentry_sdk/integrations/__init__.py` (`_AUTO_ENABLING_INTEGRATIONS` list)
30+
- Category groupings: `scripts/split_tox_gh_actions/split_tox_gh_actions.py` (`GROUPS` dict)
31+
- Core modules: `sentry_sdk/client.py`, `sentry_sdk/scope.py`, `sentry_sdk/tracing.py`, `sentry_sdk/transport.py`
32+
- Public API: `sentry_sdk/api.py` (`__all__` list)
33+
- Configuration options: `sentry_sdk/consts.py` (`ClientConstructor` class)
34+
- Style guide: `docs/codebase/_meta/style-guide.md`
35+
- Manifest: `docs/codebase/_meta/manifest.json`
36+
37+
## Instructions
38+
39+
### Step 1: Discover All Sources
40+
41+
1. Read `sentry_sdk/integrations/__init__.py` to extract `_MIN_VERSIONS` and
42+
`_AUTO_ENABLING_INTEGRATIONS`.
43+
2. Read `scripts/split_tox_gh_actions/split_tox_gh_actions.py` to extract the
44+
`GROUPS` dict for integration categorization.
45+
3. Read `sentry_sdk/consts.py` to extract all configuration options from the
46+
`ClientConstructor` class.
47+
4. Read `sentry_sdk/api.py` to extract the public API surface from `__all__`.
48+
5. Enumerate all Python files in `sentry_sdk/` (excluding `__pycache__`) to
49+
build a complete module map.
50+
51+
### Step 2: Read the Style Guide
52+
53+
Read `docs/codebase/_meta/style-guide.md` and follow all formatting rules exactly.
54+
55+
### Step 3: Generate Core Pages
56+
57+
Generate these pages by reading the corresponding source files:
58+
59+
| Page | Primary Sources |
60+
|------|----------------|
61+
| `docs/codebase/overview.md` | `sentry_sdk/api.py`, `sentry_sdk/__init__.py`, `sentry_sdk/consts.py` |
62+
| `docs/codebase/architecture.md` | `sentry_sdk/client.py`, `sentry_sdk/scope.py`, `sentry_sdk/transport.py`, `sentry_sdk/tracing.py` |
63+
| `docs/codebase/core/client.md` | `sentry_sdk/client.py` |
64+
| `docs/codebase/core/scope.md` | `sentry_sdk/scope.py` |
65+
| `docs/codebase/core/transport.md` | `sentry_sdk/transport.py` |
66+
| `docs/codebase/core/tracing.md` | `sentry_sdk/tracing.py`, `sentry_sdk/tracing_utils.py` |
67+
| `docs/codebase/core/data-model.md` | `sentry_sdk/utils.py`, `sentry_sdk/envelope.py`, `sentry_sdk/attachments.py` |
68+
| `docs/codebase/core/configuration.md` | `sentry_sdk/consts.py` |
69+
70+
### Step 4: Generate Telemetry Pages
71+
72+
| Page | Primary Sources |
73+
|------|----------------|
74+
| `docs/codebase/telemetry/errors.md` | `sentry_sdk/client.py` (capture_event, capture_exception) |
75+
| `docs/codebase/telemetry/spans-and-traces.md` | `sentry_sdk/tracing.py`, `sentry_sdk/tracing_utils.py` |
76+
| `docs/codebase/telemetry/logs.md` | `sentry_sdk/logger.py` |
77+
| `docs/codebase/telemetry/profiling.md` | `sentry_sdk/profiler/` |
78+
| `docs/codebase/telemetry/sessions.md` | `sentry_sdk/sessions.py` |
79+
| `docs/codebase/telemetry/crons.md` | `sentry_sdk/crons/` |
80+
81+
### Step 5: Generate Integration Pages
82+
83+
For each integration in `_MIN_VERSIONS`:
84+
85+
1. Map it to a category using `GROUPS`.
86+
2. Determine the subdirectory using the style guide's category mapping table.
87+
3. Read all Python files in `sentry_sdk/integrations/<name>/` (or the single
88+
`<name>.py` file).
89+
4. Read the corresponding test files in `tests/integrations/<name>/` for
90+
additional context on behavior.
91+
5. Generate the page following the integration page template from the style
92+
guide.
93+
94+
Also generate `docs/codebase/integrations/_index.md` describing the integration
95+
system: how integrations are discovered, auto-enabled, and configured.
96+
97+
### Step 6: Generate Supplementary Pages
98+
99+
- `docs/codebase/faq.md` -- Common questions derived from the codebase structure.
100+
- `docs/codebase/changelog-summary.md` -- High-level summary from `CHANGELOG.md`.
101+
102+
### Step 7: Update Manifest
103+
104+
After generating all pages, update `docs/codebase/_meta/manifest.json` with:
105+
106+
```json
107+
{
108+
"version": 1,
109+
"sdk": "python",
110+
"generated_at": "<current ISO timestamp>",
111+
"pages": {
112+
"<relative path from docs/codebase/>": {
113+
"title": "<page title>",
114+
"sources": ["<source file paths>"],
115+
"sources_hash": "<SHA-256 of concatenated source contents>",
116+
"last_updated": "<current ISO date>"
117+
}
118+
}
119+
}
120+
```
121+
122+
### Step 8: Validate
123+
124+
Before creating a PR, verify:
125+
126+
- [ ] Every integration in `_MIN_VERSIONS` has a corresponding doc page.
127+
- [ ] All pages have valid YAML front-matter with all required fields.
128+
- [ ] All pages contain every required section from the style guide.
129+
- [ ] Source citations `[S#:L##]` reference valid files and approximate line numbers.
130+
- [ ] The manifest lists every generated page.
131+
- [ ] No placeholder or TODO text remains in any page.
132+
133+
### Step 9: Create PR
134+
135+
If any pages were created or changed compared to the existing `docs/codebase/`:
136+
137+
1. Create a branch named `docs/codebase-refresh-<date>`.
138+
2. Commit all changes under `docs/codebase/`.
139+
3. Open a PR with:
140+
- Title: `docs(codebase): full refresh <date>`
141+
- Body: Summary of pages generated/updated, count of integrations covered,
142+
and any integrations that could not be documented (with reasons).
143+
- Label: `documentation`
144+
145+
If no changes are needed (all pages are up-to-date), do not create a PR.

0 commit comments

Comments
 (0)