Skip to content

Add page for pure_eval integration #1907

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 4 commits into from
Jul 22, 2020
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 @@ -377,6 +377,7 @@ Array [
"platforms/python/index.html",
"platforms/python/logging/index.html",
"platforms/python/migration/index.html",
"platforms/python/pure_eval/index.html",
"platforms/python/pyramid/index.html",
"platforms/python/pyspark/index.html",
"platforms/python/redis/index.html",
Expand Down
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 @@ -267,6 +267,7 @@ For more information, see:

- [Logging](/platforms/python/logging/)
- [GNU Backtrace](/platforms/python/gnu_backtrace/)
- [pure_eval](/platforms/python/pure_eval/)
- [Redis](/platforms/python/redis/)
- [SQLAlchemy](/platforms/python/sqlalchemy/)

Expand Down
23 changes: 23 additions & 0 deletions src/collections/_documentation/platforms/python/pure_eval.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: pure_eval
sidebar_order: 9
---

{% version_added 0.16.2 %}

This integration uses [`pure_eval`](https://github.com/alexmojaki/pure_eval) to safely evaluate additional expressions in the source code and display their values alongside other local variables.

**This integration is experimental.** It may be removed in minor versions.

Python version 3.5 or greater is required.

To install dependencies, either `pip install 'sentry-sdk[pure_eval]'` or `pip install pure_eval executing asttokens`.

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

```python
import sentry_sdk
from sentry_sdk.integrations.pure_eval import PureEvalIntegration

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