Skip to content

Commit

Permalink
Datadog: explicitly set aggregator to last
Browse files Browse the repository at this point in the history
the field is required by API and we currently leave it empty string

Signed-off-by: Alex Eftimie <[email protected]>
  • Loading branch information
alexef committed Jul 18, 2024
1 parent e4c374d commit b967b7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metricproviders/datadog/datadog.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ func (p *Provider) createRequestV2(queries map[string]string, formula string, no
"formula": formula,
}}
}
// we cannot leave aggregator empty as it will be passed as such to datadog API and fail
if aggregator == "" {
aggregator = "last"
}

attribs := datadogQueryAttributes{
// Datadog requires milliseconds for v2 api
Expand Down

0 comments on commit b967b7e

Please sign in to comment.