Skip to content

Comments

Add celery monitoring endpoint#39

Merged
paktusov merged 1 commit intomainfrom
PLAT-1898
Sep 15, 2025
Merged

Add celery monitoring endpoint#39
paktusov merged 1 commit intomainfrom
PLAT-1898

Conversation

@paktusov
Copy link
Collaborator

@paktusov paktusov commented Sep 15, 2025

Add Celery and RabbitMQ Monitoring Endpoints

This PR introduces monitoring capabilities for Celery workers and RabbitMQ queues, providing real-time insights into task processing and message queue status.

What's Changed

New Features:

  • Celery Monitoring Endpoint (/api/monitoring/celery/)

    • Real-time monitoring of active, scheduled, and pending tasks
    • Worker-level task statistics and counts
    • Support for multiple worker types (workflow, backend, etc.)
  • RabbitMQ Monitoring Endpoint (/api/monitoring/rabbitmq/)

    • Queue status monitoring for main application queues
    • Message counts and consumer utilization metrics
    • Grouped by queue types (workflow, backend)

Technical Implementation:

  • New monitoring module (workflow/monitoring.py) with CeleryMonitoring and RabbitMQMonitoring classes
  • API serializers for structured data responses
  • ViewSets with proper error handling
  • Comprehensive test suite with mocked dependencies

API Endpoints

GET /{realm_code}/{space_code}/workflow/api/monitoring/celery/
GET /{realm_code}/{space_code}/workflow/api/monitoring/rabbitmq/

Benefits

  • Operational Visibility: Real-time monitoring of task processing
  • Performance Insights: Queue utilization and consumer metrics
  • Debugging Support: Detailed task and queue information
  • System Health: Proactive monitoring capabilities

Testing

  • All new tests pass
  • Mocked external dependencies
  • Error handling scenarios covered
  • API consistency validated

Ticket: PLAT-1898
Type: Feature
Breaking Changes: None

@paktusov paktusov merged commit f72a513 into main Sep 15, 2025
2 checks passed
@paktusov paktusov deleted the PLAT-1898 branch September 15, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant