Builder

Query-side sampling for a time range

Reports how much of the stored data a query over the given range would read, so the time picker can show whether the screen is built from a sample. The measurement is the one the widget path uses and shares its cache, so it costs nothing on the common path.

get/builder/sampling

Query parameters

fromTsinteger required

Range start, Unix milliseconds

toTsinteger required

Range end, Unix milliseconds

resourcestring required

log, trace or trace.rum

Response

OK

appliedboolean

Applied is true when a query over this range reads only part of the stored rows. False means the range is small enough to read whole, the resource is not on a sampled path, or the selection could not be measured — in every one of those cases ScannedPercent is 100.

scanned_percentnumber

ScannedPercent is the share of stored rows a query reads, 0 < percent <= 100. It is the summed TierRatio of the selected SampleWeight tiers — the tier's true share of the table, as measured by the stats query rather than inferred from the weight value.

unitstring

Unit names what a row is on this resource, for the reader-facing sentence: "logs", "spans", or "RUM events".

Changes

Changed in 1 of the 2 revisions of this API.1