11 Aug 2025 05:29 AM
Hello folks,
I’ve recently come across the concept of creating pattern expressions as macros in Dynatrace Pattern Language (DPL). However, I would like to understand this feature a bit more deeply. Could someone please provide clarification or examples to help me grasp its usage?
For reference, I found the following documentation:
Additionally, I came across this community discussion that seems to address a similar topic. Is this the same? This is the feature I am looking for.
https://community.dynatrace.com/t5/Product-ideas/Macro-Feature-in-DQL/idi-p/256518
Thank you
11 Aug 2025 08:35 AM
Hi,
The link you provided initially describes macros in DPL (Dynatrace Pattern Language), which are mainly used for log parsing and defining matching patterns. The IDEA from the Community, however, refers to DQL (Dynatrace Query Language), which is used for querying data in Grail, dashboards, reports, and alerts. These are two different approaches in Dynatrace. DPL focuses on processing and extracting data from logs, while DQL is designed for searching, analyzing, and presenting data. Macros already exist in DPL, whereas the Community proposal suggests adding a similar capability to DQL to improve flexibility and reusability of query logic.
Radek
11 Aug 2025 10:31 PM
Hello @radek_jasinski ,
Thanks for your reply.
Do you have any working examples for macros on DPL? That would be great.