Skip to content
Merged
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
25 changes: 20 additions & 5 deletions src/platforms/python/guides/pyramid/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,18 @@ pip install --upgrade sentry-sdk

## Configure

To configure the SDK, initialize it with the integration before or after your app has been created:
If you have the `pyramid` package in your dependencies, the Pyramid integration will be enabled automatically when you initialize the Sentry SDK.

<SignInNote />

```python
import sentry_sdk
from sentry_sdk.integrations.pyramid import PyramidIntegration

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
integrations=[
PyramidIntegration(),
],
)

from pyramid.config import Configurator
Expand Down Expand Up @@ -86,6 +82,25 @@ When you point your browser to [http://localhost:6543/](http://localhost:6543/)

## Options

By adding `PyramidIntegration` to your `sentry_sdk.init()` call explicitly, you can set options for `PyramidIntegration` to change its behavior:

```python
import sentry_sdk
from sentry_sdk.integrations.pyramid import PyramidIntegration

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
integrations=[
PyramidIntegration(
transaction_style="route_pattern",
)
]
)
```

You can pass the following keyword arguments to `PyramidIntegration()`:

- `transaction_style`:
Expand Down