Celery monitoring SDK — see your queues, debug failed tasks, get alerts
Project description
sluice-celery
The Python SDK for Sluice — monitoring and alerting for Celery job queues.
Two lines of code. No infrastructure changes. Full visibility into every task, queue, and worker.
Install
pip install sluice-celery
Quick start
import sluice
sluice.init(api_key="sk_live_...")
That's it. The SDK auto-configures Celery's event system and starts streaming task data to the Sluice dashboard. No code changes to your tasks, no new workers to deploy, no Redis configuration.
What it does
- Auto-enables Celery events (
worker_send_task_events,task_send_sent_event,task_track_started) so you don't have to - Streams task lifecycle events (queued, started, completed, failed, retried) to the Sluice dashboard in real time
- Never crashes your workers — every code path is wrapped in exception handling. If Sluice is down, your tasks run normally
- Zero performance overhead — events are batched and sent asynchronously from a background thread. Task execution is never blocked
- No PII captured — task arguments and results are never sent. Only task names, states, timestamps, and tracebacks
Safety guarantees
The SDK runs inside your Celery workers. A bug in our code could take down your payment queue. We take that seriously:
- All signal handlers are wrapped in
try/except— a Sluice bug never propagates to your task - The background flush thread is a daemon thread — it won't prevent worker shutdown
- Memory usage is bounded — the event buffer has a hard cap, and a memory guard disables capture if RSS grows beyond a threshold
- Graceful degradation — if the Sluice API is unreachable, events are dropped silently. Your tasks keep running
Requirements
- Python 3.11+
- Celery 5.3+
Configuration
import sluice
sluice.init(
api_key="sk_live_...", # Required. Or set SLUICE_API_KEY env var
connection_id="your-conn-uuid", # Required. Or set SLUICE_CONNECTION_ID env var
)
Or configure entirely via environment variables — no code changes needed:
export SLUICE_API_KEY=sk_live_...
export SLUICE_CONNECTION_ID=your-connection-uuid
The SDK detects Django and standalone Celery automatically.
Documentation
Links
License
Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sluice_celery-0.1.0.tar.gz.
File metadata
- Download URL: sluice_celery-0.1.0.tar.gz
- Upload date:
- Size: 47.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
260d34875d7b87aa3bc16d8cb3a73ee81e67d96678881bf78a3656a179767de7
|
|
| MD5 |
bca9c8f9e0e7ddcfd9697886dfa44dd5
|
|
| BLAKE2b-256 |
1f40d2a47476301ebc16a408a8fbe3c28d2bdb4050e76b242ac88ef4133f32c7
|
Provenance
The following attestation bundles were made for sluice_celery-0.1.0.tar.gz:
Publisher:
publish-sdk.yml on artemip/sluice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sluice_celery-0.1.0.tar.gz -
Subject digest:
260d34875d7b87aa3bc16d8cb3a73ee81e67d96678881bf78a3656a179767de7 - Sigstore transparency entry: 1109046275
- Sigstore integration time:
-
Permalink:
artemip/sluice@4ade79231b417ca75bd2cd3b10556e4d7388ecb0 -
Branch / Tag:
refs/tags/sdk-v0.1.0 - Owner: https://github.com/artemip
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@4ade79231b417ca75bd2cd3b10556e4d7388ecb0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sluice_celery-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sluice_celery-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45cf3778d8e7dbe5d7958d347c48c29f9c0810a9f4442943b4bc6cf120609d0b
|
|
| MD5 |
be3ad5d15a144e4056e2c9ae675d6817
|
|
| BLAKE2b-256 |
5bc8124675c59dfb5ca2d8ae5552cf58f6794c034682aabc7c27970ca1479288
|
Provenance
The following attestation bundles were made for sluice_celery-0.1.0-py3-none-any.whl:
Publisher:
publish-sdk.yml on artemip/sluice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sluice_celery-0.1.0-py3-none-any.whl -
Subject digest:
45cf3778d8e7dbe5d7958d347c48c29f9c0810a9f4442943b4bc6cf120609d0b - Sigstore transparency entry: 1109046282
- Sigstore integration time:
-
Permalink:
artemip/sluice@4ade79231b417ca75bd2cd3b10556e4d7388ecb0 -
Branch / Tag:
refs/tags/sdk-v0.1.0 - Owner: https://github.com/artemip
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@4ade79231b417ca75bd2cd3b10556e4d7388ecb0 -
Trigger Event:
release
-
Statement type: