huey

The huey integration adds support for the huey task queue library.

To get started, install sentry-sdk from PyPI.

Copied
pip install --upgrade sentry-sdk

Add HueyIntegration() to your integrations list:

Copied
import sentry_sdk
from sentry_sdk.integrations.huey import HueyIntegration

sentry_sdk.init(
    dsn="https://examplePublicKey@o0.ingest.sentry.io/0",
    enable_tracing=True,
    integrations=[
        HueyIntegration(),
    ],
)

Copied
from huey import SqliteHuey

sentry_sdk.init(...)  # same as above

huey = SqliteHuey(filename='demo.db')

@huey.task()
def add(a, b):
    return a + b

with sentry_sdk.start_transaction(name="testing_huey"):
    result = add(1, 2)

Running this will create a new transaction called testing_huey in the Performance section of sentry.io. It may take a couple of moments for the transaction to show up.

  • huey: 2.0.0+
  • Python: 2.7, 3.5+
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").