Reference to the limit() function

Summary

limit(<numberOfTimeSeries>[, <offsetNumber>], <tsExpression>)

limit(<numberOfTraces>, <tracesExpression>)

You can use limit() with time series and with traces.

Time series filtering function Limits the number of time series displayed for tsExpression 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

ParameterDescription
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 you want to filter.

Traces Filtering Function

ParameterDescription
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 you want to filter. Includes a traces() function.

Description

You can use limit():

  • With time series as a filtering function.
  • With traces as a filtering function.

Time-Series Filtering Function

The limit() function specifies the maximum number of time series that are returned by the tsExpression using the numberOfTimeSeries. For example, the following query limits the results of the tsExpression to 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.

Traces Filtering Function

The limit() traces filtering function specifies the maximum number of traces that are returned by the tracesExpression using numberOfTraces. For example, the following query limits the results of the tracesExpression to at most 50 traces:

limit(50, traces("beachshirts.styling.makeShirts"))

Examples

Time-Series Filtering Function

The following example returns only 5 of the time series.

limit 1

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.

limit 2