Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/platforms/python/integrations/django/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ sentry_sdk.init(
django.db.models.signals.post_init,
],
cache_spans=False,
http_methods_to_capture=("GET",),
),
],
)
Expand Down Expand Up @@ -156,6 +157,18 @@ You can pass the following keyword arguments to `DjangoIntegration()`:

The default is `False`.

- `http_methods_to_capture`:

A tuple containing all the HTTP methods that should create a transaction in Sentry.

The default is `("CONNECT", "DELETE", "GET", "PATCH", "POST", "PUT", "TRACE",)`.

(Note that `OPTIONS` and `HEAD` are missing by default.)

<Alert title="Added in 2.15.0" level="info">
The `http_methods_to_capture` option.
</Alert>

## Supported Versions

- Django 1.11+
Expand Down
18 changes: 17 additions & 1 deletion docs/platforms/python/integrations/flask/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ sentry_sdk.init(
integrations = [
FlaskIntegration(
transaction_style="url",
http_methods_to_capture=("GET",),
),
],
)
Expand All @@ -76,6 +77,9 @@ You can pass the following keyword arguments to `FlaskIntegration()`:

- `transaction_style`:

Sets the format or style that transactions are named.
<br/>

```python
@app.route("/myurl/<foo>")
def myendpoint():
Expand All @@ -85,10 +89,22 @@ You can pass the following keyword arguments to `FlaskIntegration()`:
In the above code, you would set the transaction to:

- `/myurl/<foo>` if you set `transaction_style="url"`.
- `myendpoint` if you set `transaction_style="endpoint"`
- `myendpoint` if you set `transaction_style="endpoint"`.

The default is `"endpoint"`.

- `http_methods_to_capture`:

A tuple containing all the HTTP methods that should create a transaction in Sentry.

The default is `("CONNECT", "DELETE", "GET", "PATCH", "POST", "PUT", "TRACE",)`.

(Note that `OPTIONS` and `HEAD` are missing by default.)

<Alert title="Added in 2.15.0" level="info">
The `http_methods_to_capture` option.
</Alert>

## Supported Versions

- Flask: 1.0+
Expand Down