Skip to content

feat: Document changes for sentry.python 0.7.7 #850

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
merged 2 commits into from
Mar 20, 2019
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
1 change: 1 addition & 0 deletions __tests__/__snapshots__/documentation.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ Array [
"platforms/python/default-integrations/index.html",
"platforms/python/django/index.html",
"platforms/python/flask/index.html",
"platforms/python/gnu_backtrace/index.html",
"platforms/python/index.html",
"platforms/python/logging/index.html",
"platforms/python/pyramid/index.html",
Expand Down
10 changes: 8 additions & 2 deletions src/collections/_documentation/platforms/python/aiohttp.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ sidebar_order: 4

The AIOHTTP integration adds support for the [AIOHTTP-Server Web
Framework](https://docs.aiohttp.org/en/stable/web.html). A Python version of
3.7 or greater is required.
3.6 or greater is required.

1. Install `sentry-sdk` from PyPI:

```bash
$ pip install --upgrade 'sentry-sdk=={% sdk_version sentry.python %}'
```

2. Initialize the SDK before starting the server:
2. If you're on Python 3.6, you also need the `aiocontextvars` package:

```bash
$ pip install --upgrade aiocontextvars
```

3. Initialize the SDK before starting the server:

```python
import sentry_sdk
Expand Down
23 changes: 23 additions & 0 deletions src/collections/_documentation/platforms/python/gnu_backtrace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: GNU Backtrace
sidebar_order: 2
---
<!-- WIZARD -->
*Import name: `sentry_sdk.integrations.gnu_backtrace.GnuBacktraceIntegration`*

The GNU backtrace integration parses native stack trace produced by [`backtrace_symbols`](https://linux.die.net/man/3/backtrace_symbols) from error messages and concatenates them with the Python traceback.

It is currently tested to work with server exceptions raised by [`clickhouse-driver`](https://github.com/mymarilyn/clickhouse-driver).

**This integration is experimental.** It may be removed in minor versions. When enabling this integration, expect to see new event groups due to new stack trace frames.

Add ``GnuBacktraceIntegration()`` to your ``integrations`` list:

```python
import sentry_sdk
from sentry_sdk.integrations.celery import CeleryIntegration

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it importing the right integration here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought @kamilogorek backstab me but I didn't hit review 🙄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I read everything carefully -.- <3 @bruno-garcia

sentry_sdk.init("___PUBLIC_DSN___", integrations=[GnuBacktraceIntegration()])
```

<!-- ENDWIZARD -->
1 change: 1 addition & 0 deletions src/collections/_documentation/platforms/python/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ SDK. A call to `sentry_sdk.init` configures integrations. Unless you set `defaul
### Other Integrations

* [Logging]({% link _documentation/platforms/python/logging.md %})
* [GNU Backtrace]({% link _documentation/platforms/python/gnu_backtrace.md %})
* [Default integrations]({% link _documentation/platforms/python/default-integrations.md %})

{% capture __alert_content -%}
Expand Down
11 changes: 9 additions & 2 deletions src/collections/_documentation/platforms/python/sanic.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,22 @@ sidebar_order: 3
*Import name: `sentry_sdk.integrations.sanic.SanicIntegration`*

The Sanic integration adds support for the [Sanic Web
Framework](https://github.com/huge-success/sanic).
Framework](https://github.com/huge-success/sanic). A Python version of 3.6 or
greater is required.

1. Install `sentry-sdk` from PyPI:

```bash
$ pip install --upgrade 'sentry-sdk=={% sdk_version sentry.python %}'
```

2. To configure the SDK, initialize it with the integration before or after your app has been initialized:
2. If you're on Python 3.6, you also need the `aiocontextvars` package:

```bash
$ pip install --upgrade aiocontextvars
```

3. To configure the SDK, initialize it with the integration before or after your app has been initialized:

```python
import sentry_sdk
Expand Down
13 changes: 8 additions & 5 deletions src/collections/_documentation/platforms/python/tornado.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ sidebar_order: 4

The Tornado integration adds support for the [Tornado Web
Framework](https://www.tornadoweb.org/). A Tornado version of 5 or greater and
Python 3.7 or greater is required.
Python 3.6 or greater is required.

1. Install `sentry-sdk` from PyPI:

```bash
$ pip install --upgrade sentry-sdk=={% sdk_version sentry.python %}
```

2. Initialize the SDK before starting the server:
2. If you're on Python 3.6, you also need the `aiocontextvars` package:

```bash
$ pip install --upgrade aiocontextvars
```

3. Initialize the SDK before starting the server:

```python
import sentry_sdk
Expand All @@ -45,9 +51,6 @@ Python 3.7 or greater is required.

* {% include platforms/python/request-data.md %}

*Note: The tornado integration currently does not capture formdata.* See [the
relevant GitHub issue](https://github.com/getsentry/sentry-python/issues/221)

* Logging with any logger will create breadcrumbs when
the [Logging]({% link _documentation/platforms/python/logging.md %})
integration is enabled (done by default).