diff --git a/docs/platforms/python/configuration/options.mdx b/docs/platforms/python/configuration/options.mdx index 981aeb38d752b..140d266d2383f 100644 --- a/docs/platforms/python/configuration/options.mdx +++ b/docs/platforms/python/configuration/options.mdx @@ -219,7 +219,7 @@ When set to `False`, no auto-enabling integrations will be enabled by default, e Configures whether [default integrations](/platforms/python/integrations/default-integrations/) should be enabled. The default is `True`. -Setting `default_integrations` to `False` disables all default integrations **as well as all auto-enabling integrations**, unless they are specifically added in the `integrations` option, described above. +Setting `default_integrations` to `False` disables all default integrations **as well as all auto-enabling integrations**, unless they are specifically added in the `integrations` option, described above. ## Hooks @@ -386,3 +386,23 @@ The threshold in milliseconds for adding the source location to database queries Default is `100` ms. + + + +A custom [repr](https://docs.python.org/3/library/functions.html#repr) function to run while serializing an object. Use this to control how your custom objects and classes are visible in Sentry. + +Return a string for that repr value to be used or `None` to continue serializing how Sentry would have done it anyway. + +```python +def custom_repr(obj): + if isinstance(obj, MyCustomClass): + return "" + else + return None + +sentry_sdk.init(custom_repr=custom_repr) +``` + +Default is `None`. + +