Skip to main content
https://scrutinizer-ci.com/g/SectorLabs/celery-cloudwatch/badges/build.png?b=master&s=dbee8972701eec8cb3f256360b6c8f2880a8eae7 https://scrutinizer-ci.com/g/SectorLabs/celery-cloudwatch/badges/quality-score.png?b=master&s=b715993dcceb3ec81785e324f3cb36b17c40fa0f https://badge.fury.io/py/celery-cloudwatch-logs.svg https://img.shields.io/badge/license-MIT-blue.svg

This is a simple monitoring tool that intercepts the results of Celery tasks and uploads the result to AWS CloudWatch.

Installation

Install from PyPi:

pip install celery-cloudwatch-logs

Configuration

Configuration is done through environment variables. The following environment variables must be set in order for celery-cloudwatch to work:

  • AWS_CLOUDWATCH_ACCESS_KEY

  • AWS_CLOUDWATCH_SECRET_KEY

  • AWS_CLOUDWATCH_GROUP_NAME

Optionally, the following environment variables may be set:

  • REDIS_URL="redis://"

  • AWS_CLOUDWATCH_REGION="eu-west-1"

The CloudWatch log group does not have to exist. If it doesn’t exists, it will be created.

Running

$ celery cloudwatch

This requires you to have ran setup.py or installed this package through pip. Alternatively, run:

$ python -m celery_cloudwatch

How it works

Celery CloudWatch connects to your broker and monitors tasks in real time. When a task succeeded, failed was rejected or revoked, it uploads all available information about that task into a log stream on AWS CloudWatch Logs.

Based on the specified log group name in the AWS_CLOUDWATCH_GROUP_NAME, a log group will be created. For each possible result, a separate log stream is created. For each task result, an entry is added to the log stream associated with the result.

Known issues

  • --broker on celery cloudwatch is ignored.

  • No descriptive way to specify other brokers than Redis.

All brokers supported by Celery will work, simply specify the broker URL through the REDIS_URL environment variable.

Metadata

Release files for celery-cloudwatch-logs 1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for celery-cloudwatch-logs 1.7
File Size Uploaded Provenance Actions
celery-cloudwatch-logs-1.7.tar.gz 5.4 kB Without provenance Details for celery-cloudwatch-logs-1.7.tar.gz

Release files / celery-cloudwatch-logs-1.7.tar.gz

Download URL celery-cloudwatch-logs-1.7.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
42b1f699b5357c0349863e37775da02f236d3d324e67b0965d10bcc7557632f9
BLAKE2b-256 checksum
How to use checksums
3bd4530294520fb171609c21f16f43daea4b07a10a44cc68876c149b92479d75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for celery-cloudwatch-logs 1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page