I am currently experimenting with the Azure TSI Gen2 ApiVersion = "2020-07-31"
and I am wondering the effect of the GetSeries
and GetEvents
endpoints Take
-parameter.
If I query TSI data for a wide searchSpan
that contains more events than I define on my Take
-parameter, what happens? Is the data returned in some order? What is the expected form of the response data?
Documentation definition for the Take
take - integer - Maximum number of property values in the whole response set, not the maximum number of property values per page. Defaults to 10,000 when not set. Maximum value of take can be 250,000.
The take parameter specifies the number of events returned by the query (across pages). So if your search span has more events than your "take", TSI randomly selects, or 'takes', that set of records from storage. E.g. if you have 20k events in your search span, and a take of 10k, you'd get a random 10k events from the 20k in that timeframe.
In the TSI explorer, when you "Explore Events" to see the raw data, the explorer calls GetEvents. TSI explorer will always try to show the max (250k) events and will notify you if there more than 250k in the search span.
Data isn't returned in any order by the APIs. Adding sorting capabilities is something we have on our roadmap. Here's a feedback item where you can upvote the request to add this functionality, as well.
Here's some examples showing the request/response of GetEvents and other APIs.