SignalFx Developers Guide


fill fills in missing values for timeseries in a stream.


fill(value=substitute [,duration=duration])

Table 1. Parameter definitions
Parameter Type Description


generic. Default is None.

Optional: If specified, the method uses duration to replace missing values in the timeseries; otherwise, the method uses the last observed value for the timeseries.


Duration (number and duration units)
Durations are specified as a number followed by a single character:

  • s: seconds

  • m: minutes

  • h: hours

  • d: days

The default is None.

Optional: Specifies the maximum continuous duration that the method applies the fill for a specific timeseries, after which the fill stops. If you don’t specify the duration, the fill continues as long as the timeseries is in the input stream.

As soon as the method detects reported values in the timeseries, it resets the fill duration.

The return value is a new data stream with missing values filled in.


  • Error if the fill value is not compatible with the stream type. For example, you can’t fill a numeric stream with a boolean value.

Error example

#Counter example: this is an error


The fill() method is similar to extrapolation in the data() function. The method fills the value at the same cadence as the computation itself, for example once per timeseries per iteration, and it doesn’t touch any actual values in the timeseries. Unlike extrapolation, you can apply fill anywhere in a data stream.

Use fill to provide substitute data when momentary gaps in the data occur. Use the duration argument to limit the fill duration so you avoid filling data indefinitely for a stopped or crashed server.

The method independently tracks the maximum fill duration specified in duration for each timeseries in the stream. If values occur sporadically in a timeseries, the fill method resets and restarts counting down the fill duration after each actual value. The method does the fill even if the fill duration only covers a small span of the iteration. For example, if the computation job runs at a resolution of 10 seconds and the fill duration is 12 seconds, the effective fill duration is 20 seconds.

The method only fills in data for timeseries that are included in the stream. In particular, timeseries that are no longer active or fail to match inclusion filters don’t get values filled.


#Fill with zero values.

#Fill with last value.

#Fill with last value for a maximum duration

© Copyright 2020 Splunk, Inc.

Third-party license information