# Pro Tip: Mapping Message Queues with DQL for Enhanced Observability in Dynatrace

**URL:** <https://community.dynatrace.com/t/pro-tip-mapping-message-queues-with-dql-for-enhanced-observability-in-dynatrace/53995>\
**Category:** Dynatrace Tips\
**Tags:** dynatrace-managed, tips-and-tricks, queues\
**Created:** [November 5, 2025, 2:20pm UTC](https://community.dynatrace.com/t/pro-tip-mapping-message-queues-with-dql-for-enhanced-observability-in-dynatrace/53995 "2025-11-05T14:20:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AravindhanV](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@AravindhanV](https://community.dynatrace.com/u/AravindhanV)\
**Post date:** [November 5, 2025, 2:20pm UTC](https://community.dynatrace.com/t/pro-tip-mapping-message-queues-with-dql-for-enhanced-observability-in-dynatrace/53995/1 "2025-11-05T14:20:25Z")

</div>

Hi Dynatrace Community! 👋

I wanted to share a solution I recently implemented that significantly improves the **visibility and mapping of Message Queues** —whether they are **auto-discovered via Full-Stack Monitoring** or **manually discovered through Extensions**.

### 🎯The Challenge

In complex environments, Message Queues (MQs) often operate as silent workhorses behind the scenes. However, mapping them effectively to their **related processes and services** —especially when discovered through different mechanisms—can be a challenge. This becomes even more critical when trying to **organize them under Management Zones** for better governance and alerting.

### 💡The Solution

Using **Dynatrace Query Language (DQL)**, I developed a flexible and scalable approach to:

- **Identify and correlate** Message Queues from both Full-Stack and Extension-based discoveries.
- **Map each queue to its associated process group or service** , ensuring traceability.

```markup
fetch dt.entity.queue
| fieldsAdd indirectly_receives_from
| fieldsFlatten indirectly_receives_from
| fieldsRemove indirectly_receives_from
| expand indirectly_receives_from.dt.entity.service
| join [fetch dt.entity.service | fieldsAdd runs_on], on:{left[indirectly_receives_from.dt.entity.service] == right[id]}
| fieldsRemove right.id
| fieldsAdd host = right.runs_on[dt.entity.host], PG = right.runs_on[dt.entity.process_group]
|expand host
| lookup [
fetch dt.entity.host | fields id, managementZones
] , sourceField:host, lookupField:id
| fieldsKeep entity.name, id, lookup.managementZones
| fieldsAdd mz = toString(lookup.managementZones)

```

This approach not only bridges the gap between different discovery methods but also provides a **unified view** of queue-related activity across the environment.

### 🧠 Why It Matters

- ✅ **Improved observability** of asynchronous communication layers.
- ✅ **Faster root cause analysis** by linking queues to upstream/downstream services.
- ✅ **Better compliance and audit readiness** , especially for environments governed by frameworks like ICOFR.
- ✅ **Enhanced automation** for tagging and zone management.

### 🏷 Bonus Tip: Smart Tagging for Smarter Management

With this approach, **creating tags for every queue** based on its **Process, Service, and Host** becomes straightforward. These tags act as powerful anchors for:

- **Seamless Management Zone mapping**
- **Efficient alerting** on service degradation or queue anomalies
- **Enhanced visibility** into asynchronous communication layers

### ✈What Next ?

- With the tags applied on the Queues assign it under the Management Zone&nbsp; using Workflow with the rule

type(QUEUE),tag(“\<tagName\>”)

If you’re interested in the **DQL queries** , **Workflow strategy** , or **dashboard templates** , feel free to reply—I’d be happy to share and collaborate!

Let’s keep pushing the boundaries of observability. 💡  
**#Dynatrace #dql #MessageQueues #ManagementZones #observability #automation**

**Thanks**
