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

Hi Dynatrace Community! :waving_hand:

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.

:bullseye: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.

:light_bulb: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.
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.

:brain: Why It Matters

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

:label: 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

:airplane:What Next ?

  • With the tags applied on the Queues assign it under the Management Zone  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. :light_bulb:
#Dynatrace dql #MessageQueues #ManagementZones observability automation

Thanks

3 Likes