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 meter. The stored values will be sent to an exporter for exporting.

checkpoint_set()[source]

Returns a list of MetricRecords used for exporting.

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

Return type

Sequence[MetricRecord]

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