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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"data":[{"attributes":{"by":{"ea3":{"description":"The values for each group by."},"nulla_7fe":{"description":"The values for each group by."}},"compute":{},"computes":{"ullamco_2f":"\u003cstring\u003e","do_fc0":"\u003cstring\u003e"}},"id":"\u003cstring\u003e","type":"bucket"},{"attributes":{"by":{"nisi9a":{"description":"The values for each group by."}},"compute":{},"computes":{"sunt_d":"\u003cstring\u003e","elit_d4":"\u003cstring\u003e"}},"id":"\u003cstring\u003e","type":"bucket"}],"meta":{"elapsed":"\u003clong\u003e","request_id":"\u003cstring\u003e","status":"timeout","warnings":[{"code":"\u003cstring\u003e","detail":"\u003cstring\u003e","title":"\u003cstring\u003e"},{"code":"\u003cstring\u003e","detail":"\u003cstring\u003e","title":"\u003cstring\u003e"}]}}