opentelemetry.sdk.metrics.export.processor

class opentelemetry.sdk.metrics.export.processor.Processor(stateful, resource)[source]

Bases: object

Base class for all processor types.

The processor is responsible for storing the aggregators and aggregated values received from updates from metrics in the accumulator. The stored values will be sent to an exporter for exporting.

checkpoint_set()[source]

Returns a list of ExportRecords used for exporting.

The list of ExportRecords is a snapshot created from the current data in all of the aggregators in this processor.

Return type

Sequence[ExportRecord]

finished_collection()[source]

Performs certain post-export logic.

For processors that are stateless, resets the batch map.

process(record)[source]

Stores record information to be ready for exporting.

Return type

None