Summary
limit(<numberOfTimeSeries>[, <offsetNumber>], <tsExpression>)
limit(<numberOfHistogramSeries>[, <offsetNumber>], <hsExpression>)
limit(<numberOfTraces>, <tracesExpression>)
The limit()
function shows only a specified number of items. You can use limit()
with time series, histograms, or traces.
limit()
function, because it selects randomly from all time series and does not perform a query over all data followed by filtering. It is possible that the limit()
function returns NO DATA or that it results in incorrect reporting because the function examines the underlying time series and not the actual reporting in time.
For example, the result of a query might be NO DATA even if some time series report data because the (randomly) selected time series have no data or because time series that the query looks at are not what you expect when you call
limit(number_of_timeseries)
.Time series filtering function | Limits the number of time series displayed for tsExpression in a time-series chart. |
Histogram series filtering function | Limits the number of histogram distributions displayed for hsExpression in a time-series chart. |
Traces filtering function | Limits the number of traces listed by tracesExpression in the Traces browser. |
Parameters
Time-Series Filtering Function
Parameter | Description |
---|---|
numberOfTimeSeries | Number of time series that you want displayed. You can express this parameter as a number (e.g. 10) or a percentage (e.g. 17%). |
offsetNumber | Specifies the index to start with. |
tsExpression | Expression that that describes the time series that you want to filter. |
Histogram Filtering Function
Parameter | Description |
---|---|
numberOfHistogramSeries | Number of histogram series that you want displayed. You can express this parameter as a number (e.g. 10) or a percentage (e.g. 17%). |
offsetNumber | Specifies the index to start with. |
hsExpression | Expression that that describes the histogram that you want to filter. |
Traces Filtering Function
Parameter | Description |
---|---|
numberOfTraces | Number of traces that you want listed. Express this parameter as a number (e.g. 10). Do not specify a percentage. |
tracesExpression | Expression that that describes the traces that you want to filter. Includes a traces() function. |
Description
You can use limit()
as a filtering function with time series, series of histogram distributions, or traces.
Time-Series Filtering Function
The limit()
function lets you use the numberOfTimeSeries
parameter to specify the maximum number of time series that are returned. For example, the following query returns at most 10 time series:
limit(10, ts(~sample.mem.used.percentage))
Optionally, use offsetNumber
to specify the starting index. For example, set offsetNumber
to 5 to start with the 5th item.
Histogram Series Filtering Function
The limit()
function lets you use the numberOfHistogramSeries
parameter to specify the maximum number of histogram series that are returned. For example, the following query returns at most 10 histograms:
limit(10, ts(~sample.mem.used.percentage))
Optionally, use offsetNumber
to specify the starting index. For example, set offsetNumber
to 5 to start with the 5th item.
Traces Filtering Function
The limit()
function lets you use the numberOfTraces
parameter to specify the maximum number of traces that are returned. For example, the following query returns at most 50 traces:
limit(50, traces("beachshirts.styling.makeShirts"))
limit()
to page through a set of results and obtain the next group of traces.Examples
Time-Series Filtering Function
The following example returns only 5 of the time series.
This example offsets the selection from the first example by 4. That means 1 time series is shared (the series for app-16
), the others are different.