Add queue instrumentation

Created on 7 March 2025, 26 days ago

Problem/Motivation

We have some sites that are monitored by Sentry/Raven that use Drupal's queue API quite heavily.

Sentry has queue instrumentation and it would be nice to get better observability by integrating this into Drupal: https://docs.sentry.io/platforms/php/tracing/instrumentation/queues-module/

Steps to reproduce

Proposed resolution

?

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

6.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom longwave UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @longwave
  • πŸ‡ΊπŸ‡ΈUnited States mfb San Francisco

    Did you have a concept for how to instrument the queue API? I didn't see anything obvious last I looked, unlike Laravel which fires events as jobs are processed. Might be necessary to alter/override the queue service and/or work on adding instrumentability to core queue?

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Yeah I wasn't quite sure how we would go about this.. I think it would require overriding the queue backend or queue factory for the producer side, and the same or perhaps Cron::processQueues() for the consumer part.

  • πŸ‡ΊπŸ‡ΈUnited States mfb San Francisco

    I'd like to see it built in to core - presumably by dispatching events - so no overriding would be necessary. So next step could be to file a core feature request

Production build 0.71.5 2024