Differences between Datadog and PromQL functions and operators

Datadog is a metrics platform that uses a proprietary query language to aggregate and visualize data.

Learn more about:

The following sections are an approximate mapping between Datadog functions and operators, and those used in PromQL. In some cases, more than one PromQL function is mapped to a single Datadog function. When PromQL has more than one related function in the table, one of the options might be a better match for what the user needs a query to accomplish.

For example, the Datadog function abs(), when translated to a PromQL query, might match abs(), absent(), or absent_over_time() depending on the query.

Rollups

Datadog uses rollups to aggregate data points in a single time series, and are applied using the .rollup() function. With Chronosphere, rollups can be defined only on ingest, and not at query time. However, PromQL offers a set of functions (opens in a new tab) that lets you aggregate individual time series over time.

Functions

DatadogPromQLNotes
abs()abs()
absent()
absent_over_time()
round()ceil()Datadog rounds to the nearest integer.
changes()
ceil()clamp_max()
floor()clamp_min()
day_of_month()
day_of_week()
days_in_month()
diff()delta()diff() returns value difference between points. delta() requires specified first and last point in query.
derivative()deriv()Use deriv() only with gauges.
exp()
round()round()Datadog rounds to the nearest integer.
p50, p75, p90, p95, p99histogram_quantile()PromQL needs specified percentile. Datadog is hard coded.
autosmooth()holt_winters()autosmooth() is dynamic. holt_winters() has you specify smooth and trend factors.
hour()
idelta()
increase()
irate()
label_join()
label_replace()
exp()ln()
log2()log2()
log10()log10()
minute()
month()
predict_linear()
per_second()rate()
resets()
floor()
scalar()
sort()
sort_desc()
sqrt()
time()
timestamp()
vector()
year()

Time functions

DatadogPromQLNotes
avg_5min(), avg_10min, avg_30min(), avg_hourly(), avg_daily()avg_over_time()PromQL needs specified interval. Datadog is coded.
avg_daily()
min_over_time()
max_over_time()
sumsum()sum_over_time()
count_over_time()
quantile_over_time()
stddev_over_time()
stdvar_over_time()

Aggregations

DatadogPromQLNotes
sum()sum()
min()min()
max()max()
avg()avg()
group()
stddev()
stdvar()
count()count()
count_values()
bottomk()
topk()
quantile()

Binary operators

DatadogPromQLNotes
none==
none!=
none>
none<
none>=
none<=

Boolean operations

DatadogPromQLNotes
andandIntersection
ororUnion
notunlessComplement
in
not in
!

Operations

DatadogPromQLNotes
++
--
**
//
%%
^^