Skip to content

Commit

Permalink
docs: Rename python configuration options and add deprecation alerts
Browse files Browse the repository at this point in the history
Rename `request_bodies` to `max_request_body_size` and
add deprecation alert. Add deprecation alert also for `with_locals`.
  • Loading branch information
mgaligniana committed Jul 17, 2023
1 parent a85a39e commit c5758a0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
35 changes: 17 additions & 18 deletions src/platforms/common/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -349,18 +349,7 @@ A list of exception types that will be filtered out before sending to Sentry.

</ConfigKey>

<ConfigKey name="request-bodies" supported={["python"]}>

This parameter controls if integrations should capture HTTP request bodies. It can be set to one of the following values:

- `never`: request bodies are never sent
- `small`: only small request bodies will be captured where the cutoff for small depends on the SDK (typically 4KB)
- `medium`: medium and small requests will be captured (typically 10KB)
- `always`: the SDK will always capture the request body for as long as Sentry can make sense of it

</ConfigKey>

<ConfigKey name="max-request-body-size" supported={["php", "dotnet.aspnet", "dotnet.aspnetcore", "java"]}>
<ConfigKey name="max-request-body-size" supported={["php", "dotnet.aspnet", "dotnet.aspnetcore", "java", "python"]}>

This parameter controls whether integrations should capture HTTP request bodies. It can be set to one of the following values:

Expand All @@ -377,12 +366,6 @@ The number of characters after which the values containing text in the event pay

</ConfigKey>

<ConfigKey name="with-locals" supported={["python"]}>

When enabled, local variables are sent along with stackframes. This can have a performance and PII impact. Enabled by default on platforms where this is available.

</ConfigKey>

<ConfigKey name="ca-certs" supported={["python", "node"]}>

A path to an alternative CA bundle file in PEM-format.
Expand All @@ -405,6 +388,22 @@ The number of context lines for each frame when loading a file.

</ConfigKey>

<ConfigKey name="request-bodies" supported={["python"]}>

#### Deprecated

Has been renamed to [max_request_body_size](/platforms/python/configuration/options/#max-request-body-size).

</ConfigKey>

<ConfigKey name="with-locals" supported={["python"]}>

#### Deprecated

Has been renamed to [include_local_variables](/platforms/python/configuration/options/#include-local-variables).

</ConfigKey>

<ConfigKey name="initial-scope" supported={["javascript","node"]} notSupported={["react-native"]}>

Data to be set to the initial scope. Initial scope can be defined either as an object or a callback function, as shown below.
Expand Down
4 changes: 2 additions & 2 deletions src/platforms/python/common/data-collected.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ The request body of incoming HTTP requests can be sent to Sentry. Whether it's s
-JSON and form bodies are sent
-Raw request bodies are always removed
-Uploaded files in the request bodies are never sent to Sentry
- **The size of the request body:** There's a ["request_bodies"](/platforms/python/configuration/options/#request-bodies) option that's set to `medium` by default. This means that larger request bodies aren't sent to Sentry.
- **The size of the request body:** There's a ["max_request_body_size"](/platforms/python/configuration/options/#max-request-body-size) option that's set to `medium` by default. This means that larger request bodies aren't sent to Sentry.

If you want to prevent bodies from being sent to Sentry altogether, set `request_bodies` to `"never"`.
If you want to prevent bodies from being sent to Sentry altogether, set `max_request_body_size` to `"never"`.

## Source Context

Expand Down

0 comments on commit c5758a0

Please sign in to comment.