Dynatrace tips
Tips and workarounds from Dynatrace users for Dynatrace users.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

AravindhanV
Advisor

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

aravind
0 REPLIES 0

Featured Posts