generic_exporters.processors.exporters package

Subpackages

Submodules

generic_exporters.processors.exporters.exporter module

class generic_exporters.processors.exporters.exporter.TimeSeriesExporter(query: QueryPlan, datastore: TimeSeriesDataStoreBase, *, buffer: timedelta = datetime.timedelta(seconds=300), concurrency: int | None = None, sync: bool = True)

Bases: _TimeSeriesExporterBase

Inherit from this class to export the history of any Metric to a datastore of your choice.

You must define a start_timestamp method that will determine the start of the historical range, and a data_exists method that determines whether or not the datastore already contains data for the Metric at a particular timestamp. This class will handle the rest.

async _ensure_data(ts: datetime) None
data_exists

Returns True if data exists at timestamp, False if it does not and must be exported.

run

Exports the full history for this exporter’s Metric to the datastore

Module contents

class generic_exporters.processors.exporters.TimeSeriesExporter(query: QueryPlan, datastore: TimeSeriesDataStoreBase, *, buffer: timedelta = datetime.timedelta(seconds=300), concurrency: int | None = None, sync: bool = True)

Bases: _TimeSeriesExporterBase

Inherit from this class to export the history of any Metric to a datastore of your choice.

You must define a start_timestamp method that will determine the start of the historical range, and a data_exists method that determines whether or not the datastore already contains data for the Metric at a particular timestamp. This class will handle the rest.

async _ensure_data(ts: datetime) None
data_exists

Returns True if data exists at timestamp, False if it does not and must be exported.

run

Exports the full history for this exporter’s Metric to the datastore