Skip to content

permitio/datadog-celery-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Datadog Celery Issue Reproduction

This project demonstrates a setup for reproducing a Datadog Celery issue.

Installation

  1. Clone the repository:
    git clone <repository-url>
    cd datadog-celery-issue
  2. Create a virtual environment using uv:
    uv venv
    source .venv/bin/activate  # On Windows use `.venv\Scripts\activate`
  3. Install dependencies using uv:
    uv pip sync requirements.txt
  4. Set up environment variables: Create a .env file in the root of the project and add the necessary environment variables. For example:
    # Example .env file
    DD_API_KEY=<your_datadog_api_key>
    DD_SITE=<your_datadog_site>
    # Add other necessary environment variables for RabbitMQ, etc.

Running the Application

This application consists of two main components: a Producer and a Consumer.

Running the Producer

The producer is a Uvicorn application. To run it:

uv run uvicorn producer.main:app --reload

You can also set the DD_SERVICE environment variable to test-producer-service before running.

Running the Consumer

The consumer is a Celery worker. To run it:

uv run celery -A consumer.main.app worker -Q celery.consumer

You can also set the DD_SERVICE environment variable to test-consumer-service before running.

Using VSCode Launch Configurations

Alternatively, you can use the provided VSCode launch configurations:

  1. Open the project in VSCode.
  2. Go to the "Run and Debug" view (usually a play button icon with a bug on the sidebar).
  3. Select either "Producer" or "Consumer" from the dropdown menu.
  4. Click the green play button to start the selected component.

The launch configurations will automatically use the .env file and set the appropriate DD_SERVICE environment variable.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages