Dynatrace segments are designed to act as context for DQL queries. Similar to timeframes, segments will directly impact how much data is scanned and returned for a given query.
Grail is the Dynatrace data lakehouse designed explicitly for observability data. It acts as a single unified storage solution for logs, metrics, traces, events, and more.
Dynatrace Query Language (DQL) is a powerful tool to explore your data and discover patterns, identify anomalies and outliers, create statistical modeling, and more based on data stored in Dynatrace Grail.
Grail acts as the primary backend for apps on the Dynatrace platform. Data displayed in those apps is fetched from Grail using DQL queries.
Segments act as an optional context for DQL queries, injecting user-defined, preconfigured filter conditions.
During query execution, Grail evaluates only relevant conditions of segments passed based on the query's targeted data object. While a fetch logs
query will look at filter conditions for logs only, a timeseries
query will only evaluate filter conditions for metrics, and so on.
For details on how segments are passed in the context of a DQL Query API request, see ExecuteRequest.