Skip to content

Commit df8f0d4

Browse files
docs: Remove generic references from Python (#15072)
Remove generic references or plural references to SDKs in the Python SDK docs. Closes #15062
1 parent 692cd75 commit df8f0d4

File tree

16 files changed

+43
-35
lines changed

16 files changed

+43
-35
lines changed

docs/platforms/python/configuration/draining.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ sidebar_order: 80
44
description: "Learn more about the default behavior of our SDK if the application shuts down unexpectedly."
55
---
66

7-
The default behavior of most SDKs is to send out events over the network
8-
asynchronously in the background. This means that some events might be lost if the application shuts down unexpectedly. The SDKs provide mechanisms to cope with this.
7+
By default the SDK sends out events over the network on a background thread. This means that some events might be lost if the application shuts down unexpectedly. The SDK provides mechanisms to cope with this.
98

109
The Python SDK automatically drains on shutdown unless the `AtexitIntegration` is removed or the `shutdown_timeout`
1110
config key is set to 0. If you need to manually drain, the client provides a `close` method:

docs/platforms/python/configuration/draining__v1.x.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ sidebar_order: 80
44
description: "Learn more about the default behavior of our SDK if the application shuts down unexpectedly."
55
---
66

7-
The default behavior of most SDKs is to send out events over the network
8-
asynchronously in the background. This means that some events might be lost if the application shuts down unexpectedly. The SDKs provide mechanisms to cope with this.
7+
By default the SDK sends out events over the network on a background thread. This means that some events might be lost if the application shuts down unexpectedly. The SDK provides mechanisms to cope with this.
98

109
The Python SDK automatically drains on shutdown unless the `AtexitIntegration` is removed or the `shutdown_timeout`
1110
config key is set to 0. To manually drain the client provides a `close` method:

docs/platforms/python/configuration/filtering/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Typically, a `hint` holds the original exception so that additional data can be
6262

6363
<PlatformContent includePath="configuration/before-send-hint" />
6464

65-
When the SDK creates an event or breadcrumb for transmission, that transmission is typically created from some sort of source object. For instance, an error event is typically created from a log record or exception instance. For better customization, SDKs send these objects to certain callbacks (<PlatformIdentifier name="before-send" />, <PlatformIdentifier name="before-breadcrumb" /> or the event processor system in the SDK).
65+
When the SDK creates an event or breadcrumb for transmission, that transmission is typically created from some sort of source object. For instance, an error event is typically created from a log record or exception instance. For better customization, the SDK sends these objects to certain callbacks (<PlatformIdentifier name="before-send" />, <PlatformIdentifier name="before-breadcrumb" /> and event processors).
6666

6767
### Using Hints
6868

@@ -75,7 +75,7 @@ Event and breadcrumb `hints` are objects containing various information used to
7575

7676
For events, hints contain properties such as `event_id`, `originalException`, `syntheticException` (used internally to generate cleaner stack trace), and any other arbitrary `data` that you attach.
7777

78-
For breadcrumbs, the use of `hints` is implementation dependent. For XHR requests, the hint contains the xhr object itself; for user interactions the hint contains the DOM element and event name and so forth.
78+
For breadcrumbs, the use of `hints` depends on the type of breadcrumb. For logs, the hint contains the original `logging` log record.
7979

8080
<PlatformContent includePath="configuration/before-send-fingerprint">
8181

docs/platforms/python/configuration/options.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,21 +240,21 @@ These options can be used to hook the SDK in various ways to customize the repor
240240

241241
<SdkOption name="before_send" type='function' defaultValue='None'>
242242

243-
This function is called with an SDK-specific message or error event object, and can return a modified event object, or `null` to skip reporting the event. This can be used, for instance, for manual PII stripping before sending.
243+
This function is called with the event payload, and can return a modified event object, or `None` to skip reporting the event. This can be used, for instance, for manual PII stripping before sending.
244244

245245
By the time `before_send` is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect.
246246

247247
</SdkOption>
248248

249249
<SdkOption name="before_send_transaction" type='function' defaultValue='None'>
250250

251-
This function is called with an SDK-specific transaction event object, and can return a modified transaction event object, or `null` to skip reporting the event. One way this might be used is for manual PII stripping before sending.
251+
This function is called with a transaction event object, and can return a modified transaction event object, or `None` to skip reporting the event. One way this might be used is for manual PII stripping before sending.
252252

253253
</SdkOption>
254254

255255
<SdkOption name="before_breadcrumb" type='function' defaultValue='None'>
256256

257-
This function is called with an SDK-specific breadcrumb object before the breadcrumb is added to the scope. When nothing is returned from the function, the breadcrumb is dropped. To pass the breadcrumb through, return the first argument, which contains the breadcrumb object.
257+
This function is called with a breadcrumb object before the breadcrumb is added to the scope. When nothing is returned from the function, the breadcrumb is dropped. To pass the breadcrumb through, return the first argument, which contains the breadcrumb object.
258258
The callback typically gets a second argument (called a "hint") which contains the original object from which the breadcrumb was created to further customize what the breadcrumb should look like.
259259

260260
</SdkOption>
@@ -277,7 +277,7 @@ Transports are used to send events to Sentry. Transports can be customized to so
277277

278278
<SdkOption name="transport" type='sentry_sdk.transport.Transport' defaultValue='None'>
279279

280-
Switches out the transport used to send events. How this works depends on the SDK. It can, for instance, be used to capture events for unit-testing or to send it through some more complex setup that requires proxy authentication.
280+
Switches out the transport used to send events. It can, for instance, be used to capture events for unit-testing or to send it through some more complex setup that requires proxy authentication.
281281

282282
</SdkOption>
283283

@@ -313,7 +313,7 @@ A dict containing additional proxy headers (usually for authentication) to be fo
313313

314314
<SdkOption name="shutdown_timeout" type='int' defaultValue='2'>
315315

316-
Controls how many seconds to wait before shutting down. Sentry SDKs send events from a background queue. This queue is given a certain amount to drain pending events. The default is SDK specific but typically around two seconds. Setting this value too low may cause problems for sending events from command line applications. Setting the value too high will cause the application to block for a long time for users experiencing network connectivity problems.
316+
Controls how many seconds to wait before shutting down. The SDK sends events from a background queue. This queue is given a certain amount to drain pending events. Setting this value too low may cause problems for sending events from command line applications. Setting the value too high will cause the application to block for a long time for users experiencing network connectivity problems.
317317

318318
</SdkOption>
319319

docs/platforms/python/configuration/sampling.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ By default, none of these options are set, meaning no transactions will be sent
7575

7676
### Default Sampling Context Data
7777

78-
The information contained in the <PlatformIdentifier name="sampling-context" /> object passed to the <PlatformIdentifier name="traces-sampler" /> when a transaction is created varies by platform and integration.
78+
The information contained in the <PlatformIdentifier name="sampling-context" /> object passed to the <PlatformIdentifier name="traces-sampler" /> when a transaction is created varies by integration.
7979

8080
<PlatformContent includePath="performance/default-sampling-context" />
8181

docs/platforms/python/configuration/sessions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_order: 50
44
description: "Learn how to configure your SDK to tell Sentry about users sessions."
55
---
66

7-
A session represents the interaction between the user and the application. Sessions contain a timestamp, a status (if the session was OK or if it crashed), and are always linked to a release. Most Sentry SDKs can manage sessions automatically.
7+
A session represents the interaction between the user and the application. Sessions contain a timestamp, a status (if the session was OK or if it crashed), and are always linked to a release. The SDK manages sessions automatically on <PlatformLink to="/integrations/#web-frameworks">supported web frameworks</PlatformLink>.
88

99
<PlatformContent includePath="configuration/auto-session-tracking" />
1010

docs/platforms/python/data-management/sensitive-data/index.mdx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,19 @@ These are some great examples for data scrubbing that every company should think
1919

2020
We offer the following options depending on your legal and operational needs:
2121

22-
- filtering or scrubbing sensitive data within the SDK, so that data is _not sent to_ Sentry. Different SDKs have different capabilities, and configuration changes require a redeployment of your application.
22+
- filtering or scrubbing sensitive data within the SDK, so that data is _not sent to_ Sentry. Configuration changes require a redeployment of your application.
2323
- [configuring server-side scrubbing](/security-legal-pii/scrubbing/server-side-scrubbing/) to ensure Sentry does _not store_ data. Configuration changes are done in the Sentry UI and apply immediately for new events.
2424
- [running a local Relay](/product/relay/) on your own server between the SDK and Sentry, so that data is _not sent to_ Sentry while configuration can still be applied without deploying.
2525

2626
<Alert>
2727

2828
Ensure that your team is aware of your company's policy around what can and cannot be sent to Sentry. We recommend determining this policy early in your implementation and communicating it as well as enforcing it via code review.
2929

30-
If you are using Sentry in your mobile app, read our [frequently asked questions about mobile data privacy](/security-legal-pii/security/mobile-privacy/) to assist with Apple App Store and Google Play app privacy details.
31-
3230
</Alert>
3331

3432
## Personally Identifiable Information (PII)
3533

36-
Our newer SDKs do not purposefully send PII to stay on the safe side. This behavior is controlled by an option called [`send-default-pii`](../../configuration/options/#send-default-pii).
34+
The SDK purposefully does not send PII to stay on the safe side. This behavior is controlled by an option called [`send-default-pii`](../../configuration/options/#send-default-pii).
3735

3836
Turning this option on is required for certain features in Sentry to work, but also means you will need to be even more careful about what data is being sent to Sentry (using the options below).
3937

@@ -49,18 +47,18 @@ You can use the <PlatformIdentifier name="event-scrubber" /> configuration param
4947

5048
### <PlatformIdentifier name="before-send" /> & <PlatformIdentifier name="before-send-transaction" />
5149

52-
SDKs provide a <PlatformIdentifier name="before-send" /> hook, which is invoked before an error or message event is sent and can be used to modify event data to remove sensitive information. Some SDKs also provide a <PlatformIdentifier name="before-send-transaction" /> hook which does the same thing for transactions. We recommend using <PlatformIdentifier name="before-send" /> and <PlatformIdentifier name="before-send-transaction" /> in the SDKs to **scrub any data before it is sent**, to ensure that sensitive data never leaves the local environment.
50+
The SDK provides a <PlatformIdentifier name="before-send" /> hook, which is invoked before an error or message event is sent and can be used to modify event data to remove sensitive information. The SDK also provide a <PlatformIdentifier name="before-send-transaction" /> hook which does the same thing for transactions. We recommend using <PlatformIdentifier name="before-send" /> and <PlatformIdentifier name="before-send-transaction" /> in the SDK to **scrub any data before it is sent**, to ensure that sensitive data never leaves the local environment.
5351

5452
<PlatformContent includePath="configuration/before-send/" />
5553

5654
Sensitive data may appear in the following areas:
5755

58-
- Stack-locals → Some SDKs (Python, PHP and Node) will pick up variable values within the stack trace. These can be scrubbed, or this behavior can be disabled altogether if necessary.
59-
- Breadcrumbs → Some SDKs (JavaScript and the Java logging integrations, for example) will pick up previously executed log statements. **Do not log PII** if using this feature and including log statements as breadcrumbs in the event. Some backend SDKs will also record database queries, which may need to be scrubbed. Most SDKs will add the HTTP query string and fragment as a data attribute to the breadcrumb, which may need to be scrubbed.
56+
- Stack-locals → The SDK picks up variable values within the stack trace. These can be scrubbed, or this behavior can be disabled altogether if necessary.
57+
- Breadcrumbs → The SDK picks up previously executed log statements. **Do not log PII** if using this feature and including log statements as breadcrumbs in the event. The SDK will also record database queries, which may need to be scrubbed. The SDK will add the HTTP query string and fragment as a data attribute to the breadcrumb, which may need to be scrubbed.
6058
- User context → Automated behavior is controlled via <PlatformIdentifier name="send-default-pii" />.
61-
- HTTP context → Query strings may be picked up in some frameworks as part of the HTTP request context.
62-
- Transaction Names → In certain situations, transaction names might contain sensitive data. For example, a browser's pageload transaction might have a raw URL like `/users/1234/details` as its name (where `1234` is a user id, which may be considered PII). In most cases, our SDKs can parameterize URLs and routes successfully, that is, turn `/users/1234/details` into `/users/:userid/details`. However, depending on the framework, your routing configuration, race conditions, and a few other factors, the SDKs might not be able to completely parameterize all of your URLs.
63-
- HTTP Spans → Most SDKs will include the HTTP query string and fragment as a data attribute, which means the HTTP span may need to be scrubbed.
59+
- HTTP context → Query strings are picked up in web frameworks as part of the HTTP request context.
60+
- Transaction Names → In certain situations, transaction names might contain sensitive data. For example, an HTTP request transaction might have a raw URL like `/users/1234/details` as its name (where `1234` is a user id, which may be considered PII). In most cases, our SDK can parameterize URLs and routes successfully, that is, turn `/users/1234/details` into `/users/:userid/details`. However, depending on the web framework, your routing configuration, and a few other factors, the SDKs might not be able to completely parameterize all of your URLs.
61+
- HTTP Spans → The SDK includes the HTTP query string and fragment as a data attribute, which means the HTTP span may need to be scrubbed.
6462

6563
For more details and data filtering instructions, see <PlatformLink to="/configuration/filtering/">Filtering Events</PlatformLink>.
6664

@@ -88,4 +86,4 @@ As a best practice you should always avoid logging confidential information. If
8886

8987
- Anonymize the confidential information within the log statements (for example, swap out email addresses -> for internal identifiers)
9088
- Use <PlatformIdentifier name="before-breadcrumb" /> to filter it out from breadcrumbs before it is attached
91-
- Disable logging breadcrumb integration (for example, as described [here](/platforms/javascript/configuration/integrations/breadcrumbs/))
89+
- Set the `level` parameter in the <PlatformLink to="/integrations/#logging">logging integrations</PlatformLink> you use to `None`.

docs/platforms/python/enriching-events/breadcrumbs/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Manually record a breadcrumb:
2121

2222
<PlatformContent includePath="enriching-events/breadcrumbs/breadcrumbs-example" />
2323

24-
The available breadcrumb keys are `type`, `category`, `message`, `level`, `timestamp` (which many SDKs will set automatically for you), and `data`, which is the place to put any additional information you'd like the breadcrumb to include. Using keys other than these six won't cause an error, but will result in the data being dropped when the event is processed by Sentry.
24+
The available breadcrumb keys are `type`, `category`, `message`, `level`, `timestamp` (which defaults to the system's wall-clock time), and `data`, which is the place to put any additional information you'd like the breadcrumb to include. Using keys other than these six won't cause an error, but will result in the data being dropped when the event is processed by Sentry.
2525

2626
## Automatic Breadcrumbs
2727

@@ -31,7 +31,7 @@ The available breadcrumb keys are `type`, `category`, `message`, `level`, `times
3131

3232
SDKs allow you to customize breadcrumbs through the <PlatformIdentifier name="before-breadcrumb" /> hook.
3333

34-
This hook is passed an already assembled breadcrumb and, in some SDKs, an optional hint. The function can modify the breadcrumb or decide to discard it entirely by returning `null`:
34+
This hook is passed an already assembled breadcrumb and <PlatformLink to="/configuration/filtering/#using-hints">a `hint` object</PlatformLink> containing extra metadata. The function can modify the breadcrumb or decide to discard it entirely by returning `None`:
3535

3636
<PlatformContent includePath="enriching-events/breadcrumbs/before-breadcrumb" />
3737

docs/platforms/python/enriching-events/context/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Learn more about conventions for common contexts in the [contexts interface deve
2929

3030
When sending context, _consider payload size limits_. Sentry does not recommend sending the entire application state and large data blobs in contexts. If you exceed the maximum payload size, Sentry will respond with HTTP error `413 Payload Too Large` and reject the event.
3131

32-
The Sentry SDK will try its best to accommodate the data you send and trim large context payloads. Some SDKs can truncate parts of the event; for more details, see the [developer documentation on SDK data handling](https://develop.sentry.dev/sdk/expected-features/data-handling/).
32+
The Sentry SDK will try its best to accommodate the data you send and trim large context payloads. The SDK can truncate parts of the event; for more details, see the [developer documentation on SDK data handling](https://develop.sentry.dev/sdk/expected-features/data-handling/).
3333

3434
## Additional Data
3535

docs/platforms/python/enriching-events/identify-user/index.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ An alternative, or addition, to the username. Sentry is aware of email addresses
2222
### `ip_address`
2323

2424
The user's IP address. If the user is unauthenticated, Sentry uses the IP address as a unique identifier for the user.
25-
Serverside SDKs that instrument incoming requests will attempt to pull the IP address from the HTTP request data (`request.env.REMOTE_ADDR` field in JSON), if available. That might require <PlatformIdentifier name="send-default-pii" /> set to `true` in the SDK options.
25+
The SDK will attempt to pull the IP address from the HTTP request data on incoming requests (`request.env.REMOTE_ADDR` field in JSON), if available. That requires <PlatformIdentifier name="send-default-pii" /> set to `true` in the SDK options.
2626

27-
If the user's `ip_address` is set to `"{{auto}}"`, Sentry will infer the IP address from the connection between your app and Sentry's server.
28-
29-
If the field is omitted, the default value is `null`. However, due to backwards compatibility concerns, certain platforms (in particular JavaScript) have a different default value for `"{{auto}}"`. SDKs and other clients should not rely on this behavior and should set IP addresses or `"{{auto}}"` explicitly.
27+
If the user's `ip_address` is set to `"{{auto}}"`, Sentry will infer the IP address from the connection between your app and Sentry's server. If the field is omitted, the default value is `None`.
3028

3129
To opt out of storing users' IP addresses in your event data, you can go to your project settings, click on "Security & Privacy", and enable "Prevent Storing of IP Addresses" or use Sentry's [server-side data](/security-legal-pii/scrubbing/) scrubbing to remove `$user.ip_address`. Adding such a rule ultimately overrules any other logic.
3230

0 commit comments

Comments
 (0)