-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs(sdk): Move data-handling content to proper locations #16682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
stephanie-anderson
merged 13 commits into
master
from
refactor/move-data-handling-content
Mar 4, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a75ac59
docs(sdk): Move variable size limits to event-payloads
stephanie-anderson ccf4982
docs(sdk): Move breadcrumb structuring to breadcrumbs interface
stephanie-anderson 095107c
docs(sdk): Move lastEventId to scopes spec
stephanie-anderson 9f724e2
docs(sdk): Remove backpressure management from expected-features
stephanie-anderson 9248c05
docs(sdk): Add modules integration spec, move from expected-features
stephanie-anderson 0030e24
docs(sdk): Move buffer-to-disk to transport/offline-caching
stephanie-anderson 7fb14c5
docs(sdk): Move background sending to transport spec
stephanie-anderson 0dc8565
docs(sdk): Move log context to client configuration spec
stephanie-anderson cb7d427
docs(sdk): Move request body size to client configuration spec
stephanie-anderson 9c8b3f2
docs(sdk): Move automatic context data to state management specs
stephanie-anderson b08ebb8
docs(sdk): Move HTTP proxy to transport spec
stephanie-anderson 5edbc85
fix(sdk): Update broken links from expected-features migration
stephanie-anderson f02e9dd
Merge branch 'master' into refactor/move-data-handling-content
stephanie-anderson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
develop-docs/sdk/foundations/client/integrations/modules.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| --- | ||
| title: Modules | ||
| description: Integration for attaching loaded libraries and their versions to events, populating the event modules field. | ||
| spec_id: sdk/foundations/client/integrations/modules | ||
| spec_version: 1.0.0 | ||
| spec_status: stable | ||
| spec_depends_on: | ||
| - id: sdk/foundations/client/integrations | ||
| version: ">=1.0.0" | ||
| spec_changelog: | ||
| - version: 1.0.0 | ||
| date: 2026-03-04 | ||
| summary: Initial spec, extracted from expected features | ||
| sidebar_order: 4 | ||
| --- | ||
|
|
||
| <SpecRfcAlert /> | ||
|
|
||
| <SpecMeta /> | ||
|
|
||
| ## Overview | ||
|
|
||
| The Modules integration attaches a list of loaded libraries (packages, modules) and their versions to events. This populates the [`modules` field](/sdk/foundations/transport/event-payloads/#optional-attributes) on the event payload, which Sentry displays in the event detail view to help users identify dependency-related issues. | ||
|
|
||
| This integration **SHOULD** be a default integration. | ||
|
|
||
| --- | ||
|
|
||
| ## Behavior | ||
|
|
||
| <SpecSection id="event-enrichment" status="stable" since="1.0.0"> | ||
|
|
||
| ### Event Enrichment | ||
|
|
||
| The integration **MUST** use the `processEvent` lifecycle hook to attach module information to events. | ||
|
|
||
| The integration **MUST** populate `event.modules` as a map of module name to version string: | ||
|
|
||
| ```json | ||
| { | ||
| "modules": { | ||
| "flask": "2.3.1", | ||
| "requests": "2.31.0", | ||
| "sqlalchemy": "2.0.19" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| The integration **SHOULD** cache the module list, since installed packages rarely change during a process lifetime. | ||
|
|
||
| </SpecSection> | ||
|
|
||
| <SpecSection id="module-sources" status="stable" since="1.0.0"> | ||
|
|
||
| ### Module Sources | ||
|
|
||
| How modules are discovered is platform-specific. SDKs **SHOULD** use the most reliable mechanism available on their platform. Common strategies include: | ||
|
|
||
| - **Package manager metadata** — reading installed package registries (e.g., `pkg_resources` or `importlib.metadata` in Python, `package.json` dependencies in Node.js) | ||
| - **Runtime module cache** — inspecting loaded modules from the runtime (e.g., `require.cache` in Node.js CJS) | ||
| - **Build-time injection** — embedding module information at build time when runtime discovery is unavailable or incomplete (e.g., bundled environments) | ||
|
|
||
| SDKs **MAY** combine multiple sources to produce the most complete list. When the same module appears in multiple sources, the more specific version (e.g., from a lockfile or runtime cache) **SHOULD** take precedence. | ||
|
|
||
| </SpecSection> | ||
|
|
||
| <SpecSection id="event-type-filtering" status="stable" since="1.0.0"> | ||
|
|
||
| ### Event Type Filtering | ||
|
|
||
| SDKs **MAY** skip attaching modules to certain event types (e.g., transactions) where the information is less useful, to reduce payload size. | ||
|
|
||
| </SpecSection> | ||
|
|
||
| --- | ||
|
|
||
| ## Examples | ||
|
|
||
| ### JavaScript (Node.js) | ||
|
|
||
| ```javascript | ||
| // modulesIntegration is a default integration in @sentry/node | ||
| Sentry.init({ | ||
| dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", | ||
| }); | ||
|
|
||
| // Modules are automatically attached to error events. | ||
| // The integration reads from package.json and require.cache (CJS). | ||
| ``` | ||
|
|
||
| ### Python | ||
|
|
||
| ```python | ||
| import sentry_sdk | ||
|
|
||
| # ModulesIntegration is a default integration | ||
| sentry_sdk.init(dsn="https://examplePublicKey@o0.ingest.sentry.io/0") | ||
|
|
||
| # Modules are automatically attached to error events. | ||
| # The integration reads from importlib.metadata / pkg_resources. | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Changelog | ||
|
|
||
| <SpecChangelog /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.