diff --git a/docs/platforms/python/integrations/dramatiq/index.mdx b/docs/platforms/python/integrations/dramatiq/index.mdx new file mode 100644 index 0000000000000..c1e96a88359a4 --- /dev/null +++ b/docs/platforms/python/integrations/dramatiq/index.mdx @@ -0,0 +1,80 @@ +--- +title: Dramatiq +description: "Learn how to import and use the Dramatiq integration." +--- + +The Dramatiq integration adds support for the +[Dramatiq](https://dramatiq.io/) background tasks library. + + + This is the successor of the original `DramatiqIntegration` that can be found here: https://github.com/jacobsvante/sentry-dramatiq + + The original maintainer has [donated the integration to Sentry](https://github.com/getsentry/sentry-python/issues/3387), so we can take over maintenance. + + +## Install + +To get started, install `sentry-sdk` from PyPI. + +```bash +pip install --upgrade sentry-sdk +``` + +## Configure + +Add `DramatiqIntegration()` to your `integrations` list: + + + +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). + +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. + + + +```python {"onboardingOptions": {"performance": "6-8", "profiling": "9-12"}} +import sentry_sdk +from sentry_sdk.integrations.dramatiq import DramatiqIntegration + +sentry_sdk.init( + dsn="___PUBLIC_DSN___", + # Set traces_sample_rate to 1.0 to capture 100% + # of transactions for tracing. + traces_sample_rate=1.0, + # Set profiles_sample_rate to 1.0 to profile 100% + # of sampled transactions. + # We recommend adjusting this value in production. + profiles_sample_rate=1.0, + integrations=[ + DramatiqIntegration(), + ], +) +``` + +## Verify + +Trigger an error in your code to verify that the integration is sending events to Sentry. + +```python +import dramatiq + +import sentry_sdk +sentry_sdk.init(...) # same as above + +@dramatiq.actor(max_retries=0) +def dummy_actor(x, y): + return x / y + +dummy_actor.send(5, 0) +``` + +Running this will create an error event (`ZeroDivisionError`) that you should be able to see in [sentry.io](https://sentry.io). + +## Supported Versions + +- Dramatiq: 1.13+ +- Python: 3.6+ + + diff --git a/docs/platforms/python/integrations/index.mdx b/docs/platforms/python/integrations/index.mdx index 85993b1329a05..01a07ad50d003 100644 --- a/docs/platforms/python/integrations/index.mdx +++ b/docs/platforms/python/integrations/index.mdx @@ -45,17 +45,17 @@ The Sentry SDK uses integrations to hook into the functionality of popular libra | | ✓ | ### Data Processing - -| | **Auto-enabled** | -| ---------------------------------------------------------------------------------------------------------------------- | :--------------: | -| | | -| | | -| | | -| | ✓ | -| | ✓ | -| | ✓ | -| | ✓ | -| | | + | **Auto-enabled** | +| ------------------------------------------------------------------------------------------------------------------------ | :--------------: | +| | | +| | | +| | | +| | ✓ | +| | ✓ | +| | | +| | ✓ | +| | ✓ | +| | | ### Cloud Computing