Skip to content

PersistentSamplingConfiguration

A SamplingConfiguration that remembers when its measure was last collected.

The probe updates lastTime and the value is saved with the deployment, so sampling can resume from that point after an app restart. Extend it for probes that collect data since the last sample, like health data.

Inheritance
Implementers
Annotations

Constructors

PersistentSamplingConfiguration.fromJson

PersistentSamplingConfiguration.fromJson(
  1. Map<String, dynamic> json
)

PersistentSamplingConfiguration

PersistentSamplingConfiguration()

Properties

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

lastTime

DateTime? lastTime
getter/setter pair

When this measure was last collected, or null if never.

Set by the Probe; saved at most once per second.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.