05 Nov 2025
02:20 PM
- last edited on
06 Nov 2025
07:45 AM
by
MaciejNeumann
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.
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.
Using Dynatrace Query Language (DQL), I developed a flexible and scalable approach to:
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.
With this approach, creating tags for every queue based on its Process, Service, and Host becomes straightforward. These tags act as powerful anchors for:
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