There are logs with "events" that have attributes such as names, statuses, etc as well as "amount" which corresponds to a dollar amount. I'm sending requests to datadog's timeseries api to get back data about these logs.
I'm starting with a base query:
sum:events{event_name:reload,event_result:success,event_environment:main,event_market:gb}.as_count()
This query just returns the total number of these "reload" events that have occurred in the timeframe. Each of these events has an attribute "amount" which I want returned instead. I can't figure out how to format the syntax for the query to get it to return the sum of these amounts instead of the sum of the occurrences of events.
Here are some queries I have tried which do not work:
sum:events{event_name:reload,event_result:success,event_environment:main,event_market:gb}.amount.as_count()
sum:events{event_name:reload,event_result:success,event_environment:main,event_market:gb}.amount
sum:events.amount{event_name:reload,event_result:success,event_environment:main,event_market:gb}.as_count()
sum:events{event_name:reload,event_result:success,event_environment:main,event_market:gb} by {amount}.as_count()
I've had difficulty finding anything about this in the datadog documentation. If anyone understands how to perform this with datadog's query syntax I would very much appreciate the help.
Thanks