---
title: "GNU Backtrace"
description: "Learn about the GNU backtrace integration and how to add it to your integrations list."
url: https://docs.sentry.io/platforms/python/integrations/gnu_backtrace/
---

# GNU Backtrace | Sentry for Python

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).

## [Install](https://docs.sentry.io/platforms/python/integrations/gnu_backtrace.md#install)

Install `sentry-sdk` from PyPI.

```bash
pip install "sentry-sdk"
```

## [Configure](https://docs.sentry.io/platforms/python/integrations/gnu_backtrace.md#configure)

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

```python
import sentry_sdk
from sentry_sdk.integrations.gnu_backtrace import GnuBacktraceIntegration

sentry_sdk.init(
    dsn="___PUBLIC_DSN___",
    # Add data like request headers and IP for users, if applicable;
    # see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
    send_default_pii=True,
    integrations=[
        GnuBacktraceIntegration(),
    ],
)
```

## [Verify](https://docs.sentry.io/platforms/python/integrations/gnu_backtrace.md#verify)

The GNU backtrace integration is tested with server exceptions raised by [`clickhouse-driver`](https://github.com/mymarilyn/clickhouse-driver).

Other libraries must emit exceptions that have backtrace-compatible values for the GNU backtrace integration to parse the exceptions.
