---
title: "Queues"
description: "Learn how to monitor your queues with Sentry for improved application performance and health."
url: https://docs.sentry.io/product/dashboards/sentry-dashboards/backend/queues/
---

# Queues

Message Queues make asynchronous service-to-service communication possible in distributed architectures. Queues are great for helping work that sometimes fails become more resilient, and are therefore a building block for distributed applications. Some examples of what queues can help with include handling webhooks from third-party APIs or handling periodic tasks, such as calculating daily metrics for your users.

If you have [performance monitoring](https://docs.sentry.io/product/sentry-basics/performance-monitoring.md#how-to-set-up-performance-monitoring) enabled and your application interacts with message queue systems, you can configure Sentry to monitor their performance and health.

Queues allows you to monitor both the performance and error rates of both your queue consumers and producers, providing observability into your distributed system.

The Queues dashboard found in [Sentry Dashboards](https://docs.sentry.io/product/dashboards/sentry-dashboards.md) gives you a high-level overview so that you can see where messages are being written to. **Note:** You may see topic names or actual queue names, depending on the messaging system. If you click on a destination, you'll go to the **Queue Details** dashboard, which provides metrics about specific endpoints within your applications that either write to, or read from the destination. You can also dig into individual endpoints within your application representing producers creating messages, and consumers reading messages. In those lists, you'll see actual traces representing messages processed by your application.

### [Prerequisites and Limitations](https://docs.sentry.io/product/dashboards/sentry-dashboards/backend/queues.md#prerequisites-and-limitations)

Queues currently supports [auto instrumentation](https://docs.sentry.io/platform-redirect.md?next=%2Ftracing%2Finstrumentation%2Fautomatic-instrumentation) for the [Celery Distributed Task Queue](https://docs.celeryq.dev/en/stable/) in Python. Other messaging systems can be monitored using custom instrumentation.

Instructions for custom instrumentation in various languages are linked to below:

* [Python SDK](https://docs.sentry.io/platforms/python/tracing/instrumentation/custom-instrumentation/queues-module.md)
* [JavaScript SDK](https://docs.sentry.io/platforms/javascript/guides/node/tracing/instrumentation/custom-instrumentation/queues-module.md)
* [PHP SDK](https://docs.sentry.io/platforms/php/tracing/instrumentation/queues-module.md)
* [Java SDK](https://docs.sentry.io/platforms/java/tracing/instrumentation/custom-instrumentation/queues-module.md)
* [Ruby SDK](https://docs.sentry.io/platforms/ruby/tracing/instrumentation/custom-instrumentation/queues-module.md)
* [.NET SDK](https://docs.sentry.io/platforms/dotnet/tracing/instrumentation/custom-instrumentation/queues-module.md)

## [Queues Dashboard](https://docs.sentry.io/product/dashboards/sentry-dashboards/backend/queues.md#queues-dashboard)

The **Queues** dashboard provides a breakdown of queue performance by destination (the topic name or queue name). Use it as a starting point to investigate potential problems with queues, such as higher than expected processing latency.

At the top of the dashboard, the Average Duration graph shows the total time that messages take to complete. The Published versus Processed graph shows how many messages are being written to the queue versus how many are being completed. If you see an anomaly or want to investigate a time range further, click and drag to select a range directly in the graph and you'll see data for that specific time range only.

The destination table shows where messages are being published to, along with:

* Avg time in queue (the time spent both waiting and being processed in the queue)
* Avg processing time (the time spent processing the message)
* Error rate (how often do jobs fail to complete)
* Published versus processed count
* Processed (messages per minute)
* Time spent (total time your application spent processing jobs)

If you want to dig deeper into the behavior of a specific destination, click the destination name to view the **Queue Details** dashboard.

## [Queue Details Dashboard](https://docs.sentry.io/product/dashboards/sentry-dashboards/backend/queues.md#queue-details-dashboard)

To view the **Queue Details** dashboard click a [destination](https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/#destinations) in the **Queues** dashboard.

At the top of the dashboard you'll see average time in queue, average processing latency, error rate, published versus processed counts, and the total time spent by your application processing jobs. These metrics are shown in relation to the destination, whereas the **Queues** dashboard shows summed up metrics across all destinations. Below the summary you can view graphs for average latency and published versus processed counts.

At the bottom of the dashboard, a table is shown listing transactions that either published or processed queue messages.

If a problem with a specific endpoint jumps out at you, click the transaction to view sample spans and to navigate to the corresponding trace.

### [Sample List](https://docs.sentry.io/product/dashboards/sentry-dashboards/backend/queues.md#sample-list)

Click on an endpoint to open a list of sample spans. This will take you to the traces page for that transaction.

### [Producer Sample List](https://docs.sentry.io/product/dashboards/sentry-dashboards/backend/queues.md#producer-sample-list)

Sentry automatically finds a variety of samples to help you investigate performance problems. The chosen spans cover the entire selected time range, as well as a range of durations and failure statues.

The Producer panel shows the number of messages the producer has published, the error rate (representing errors that occur while publishing the message), and the average duration of the transaction that publishes the message to the queue.

To dig even deeper, click on a span identifier to view a detailed trace.

### [Consumer Sample List](https://docs.sentry.io/product/dashboards/sentry-dashboards/backend/queues.md#consumer-sample-list)

Sentry automatically finds a variety of samples to help you investigate performance problems. The chosen spans cover the entire selected time range, as well as a range of durations and failure statues.

The Consumer panel shows the number of messages the consumer has processed, the error rate, the average time a message spends in a queue, and the average amount of time spent processing the message.

To dig even deeper, click on a transaction to go to the transaction summary page, or a span in the traces page to see a waterfall view of the span.
