Aggregate spans

POST {{baseUrl}}/api/v2/spans/analytics/aggregate

The API endpoint to aggregate spans into buckets and compute metrics and timeseries. This endpoint is rate limited to 300 requests per hour.

Request Body

{"data"=>{"attributes"=>{"compute"=>[{"aggregation"=>"avg", "interval"=>"<string>", "metric"=>"<string>", "type"=>"total"}, {"aggregation"=>"pc98", "interval"=>"<string>", "metric"=>"<string>", "type"=>"total"}], "filter"=>{"from"=>"now-15m", "query"=>"*", "to"=>"now"}, "group_by"=>[{"facet"=>"<string>", "histogram"=>{"interval"=>"<double>", "min"=>"<double>", "max"=>"<double>"}, "limit"=>10, "missing"=>"<string>", "sort"=>{"aggregation"=>"count", "metric"=>"<string>", "order"=>"desc", "type"=>"alphabetical"}, "total"=>"<boolean>"}, {"facet"=>"<string>", "histogram"=>{"interval"=>"<double>", "min"=>"<double>", "max"=>"<double>"}, "limit"=>10, "missing"=>"<string>", "sort"=>{"aggregation"=>"pc99", "metric"=>"<string>", "order"=>"desc", "type"=>"alphabetical"}, "total"=>"<boolean>"}], "options"=>{"timeOffset"=>"<long>", "timezone"=>"UTC"}}, "type"=>"aggregate_request"}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;data&quot;:[{&quot;attributes&quot;:{&quot;by&quot;:{&quot;ea3&quot;:{&quot;description&quot;:&quot;The values for each group by.&quot;},&quot;nulla_7fe&quot;:{&quot;description&quot;:&quot;The values for each group by.&quot;}},&quot;compute&quot;:{},&quot;computes&quot;:{&quot;ullamco_2f&quot;:&quot;\u003cstring\u003e&quot;,&quot;do_fc0&quot;:&quot;\u003cstring\u003e&quot;}},&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;bucket&quot;},{&quot;attributes&quot;:{&quot;by&quot;:{&quot;nisi9a&quot;:{&quot;description&quot;:&quot;The values for each group by.&quot;}},&quot;compute&quot;:{},&quot;computes&quot;:{&quot;sunt_d&quot;:&quot;\u003cstring\u003e&quot;,&quot;elit_d4&quot;:&quot;\u003cstring\u003e&quot;}},&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;bucket&quot;}],&quot;meta&quot;:{&quot;elapsed&quot;:&quot;\u003clong\u003e&quot;,&quot;request_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;status&quot;:&quot;timeout&quot;,&quot;warnings&quot;:[{&quot;code&quot;:&quot;\u003cstring\u003e&quot;,&quot;detail&quot;:&quot;\u003cstring\u003e&quot;,&quot;title&quot;:&quot;\u003cstring\u003e&quot;},{&quot;code&quot;:&quot;\u003cstring\u003e&quot;,&quot;detail&quot;:&quot;\u003cstring\u003e&quot;,&quot;title&quot;:&quot;\u003cstring\u003e&quot;}]}}