diff --git a/src/platforms/python/common/configuration/integrations/pure_eval.mdx b/src/platforms/python/common/configuration/integrations/pure_eval.mdx index dbc8ea5cd0d27..416a5300da873 100644 --- a/src/platforms/python/common/configuration/integrations/pure_eval.mdx +++ b/src/platforms/python/common/configuration/integrations/pure_eval.mdx @@ -4,16 +4,8 @@ description: "Learn about `pure_eval` and how to add it to your integrations lis sidebar_order: 40 --- - - 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. - - - ## Install Install `sentry-sdk` from PyPI with the `pure_eval` extra or `pip install pure_eval executing asttokens`. @@ -40,6 +32,23 @@ sentry_sdk.init( ) ``` +## Verify + +```python +from types import SimpleNamespace + +def main(): + sentry_sdk.init(...) # same as above + + namespace = SimpleNamespace() + namespace.d = {1: 2} + print(namespace.d[1] / 0) + +main() +``` + +When you run this example script an error will be sent to Sentry. Through the `PureEvalIntegration` the stack trace of the error will include the values of `namespace.d` and `namespace.d[1]` which would not be shown without `PureEvalIntegration`. + ## Supported Versions - Python: 3.5+