Skip to content

Commit

Permalink
fix(datadog): Create metricset placeholder (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorymfoster authored and Matt Duftler committed May 20, 2019
1 parent 5a46e7c commit abf9dc7
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@ public List<MetricSet> queryMetrics(String accountName, CanaryConfig canaryConfi
);
}

if (ret.isEmpty()) {
// Add placeholder metric set.
ret.add(
MetricSet.builder()
.name(canaryMetricConfig.getName())
.startTimeMillis(canaryScope.getStart().toEpochMilli())
.startTimeIso(canaryScope.getStart().toString())
.endTimeMillis(canaryScope.getEnd().toEpochMilli())
.endTimeIso(canaryScope.getEnd().toString())
.stepMillis(1000)
.values(new ArrayList<>())
.attribute("query", query)
.build()
);
}

return ret;
}

Expand Down

0 comments on commit abf9dc7

Please sign in to comment.