popoto._error_reporting¶
popoto._error_reporting
¶
Opt-in error reporting for Popoto via an isolated Sentry client.
This module provides a way for Popoto users to automatically report
library-specific errors back to the Popoto maintainers. It is entirely
opt-in: nothing runs unless enable_error_reporting() is called, and
the feature degrades silently if sentry-sdk is not installed or any
internal error occurs.
The Sentry client is fully isolated from the application's own Sentry
configuration -- it never calls sentry_sdk.init() and never touches
the global scope.
enable_error_reporting(dsn=None)
¶
Enable opt-in error reporting to the Popoto maintainers.
When enabled, exceptions originating in Popoto code are reported to a Sentry project maintained by the Popoto authors. This helps identify and fix bugs that users encounter in the wild.
This is entirely opt-in. You must call this function explicitly
for any reporting to occur. If sentry-sdk is not installed, this
function silently does nothing.
The reporter uses an isolated Sentry client that does not
interfere with your application's own sentry_sdk.init() or
global Sentry configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dsn
|
Optional[str]
|
Optional Sentry DSN override. By default, errors are
reported to the Popoto maintainers' Sentry project. Set
|
None
|
Example::
import popoto
popoto.enable_error_reporting()
Source code in src/popoto/_error_reporting.py
capture_exception(exc=None)
¶
Capture an exception and send it to the Popoto Sentry project.
This is a no-op if error reporting has not been enabled or if any internal error occurs.