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:
- Datadog queries
- Querying Prometheus (opens in a new tab)
- Prometheus operators and the Chronosphere Collector
- Chronosphere and Datadog field equivalents for monitors
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
Datadog | PromQL | Notes |
---|---|---|
abs() | abs() | none |
absent() | none | |
absent_over_time() | none | |
round() | ceil() | Datadog rounds to the nearest integer. |
changes() | none | |
ceil() | clamp_max() | none |
floor() | clamp_min() | none |
day_of_month() | none | |
day_of_week() | none | |
days_in_month() | none | |
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() | none | |
round() | round() | Datadog rounds to the nearest integer. |
p50 , p75 , p90 , p95 , p99 | histogram_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() | none | |
idelta() | none | |
increase() | none | |
irate() | none | |
label_join() | none | |
label_replace() | none | |
exp() | ln() | none |
log2() | log2() | none |
log10() | log10() | none |
minute() | none | |
month() | none | |
predict_linear() | none | |
per_second() | rate() | none |
resets() | none | |
floor() | none | |
scalar() | none | |
sort() | none | |
sort_desc() | none | |
sqrt() | none | |
time() | none | |
timestamp() | none | |
vector() | none | |
year() | none |
Time functions
Datadog | PromQL | Notes |
---|---|---|
avg_5min() , avg_10min , avg_30min() , avg_hourly() , avg_daily() | avg_over_time() | PromQL needs specified interval. Datadog is coded. |
avg_daily() | N/A | none |
N/A | min_over_time() | none |
N/A | max_over_time() | none |
sumsum() | sum_over_time() | none |
N/A | count_over_time() | none |
N/A | quantile_over_time() | none |
N/A | stddev_over_time() | none |
N/A | stdvar_over_time() | none |
Aggregations
Datadog | PromQL | Notes |
---|---|---|
sum() | sum() | none |
min() | min() | none |
max() | max() | none |
avg() | avg() | none |
N/A | group() | none |
N/A | stddev() | none |
N/A | stdvar() | none |
count() | count() | none |
N/A | count_values() | none |
N/A | bottomk() | none |
N/A | topk() | none |
N/A | quantile() | none |
Binary operators
Datadog | PromQL | Notes |
---|---|---|
none | == | none |
none | != | none |
none | > | none |
none | < | none |
none | >= | none |
none | <= | none |
Boolean operations
Datadog | PromQL | Notes |
---|---|---|
and | and | Intersection |
or | or | Union |
not | unless | Complement |
in | N/A | none |
not in | N/A | none |
! | N/A | none |
Operations
Datadog | PromQL | Notes |
---|---|---|
+ | + | none |
- | - | none |
* | * | none |
/ | / | none |
% | % | none |
^ | ^ | none |