opentelemetry.sdk.metrics.export.aggregate

class opentelemetry.sdk.metrics.export.aggregate.Aggregator[source]

Bases: abc.ABC

Base class for aggregators.

Aggregators are responsible for holding aggregated values and taking a snapshot of these values upon export (checkpoint).

abstract update(value)[source]

Updates the current with the new value.

abstract take_checkpoint()[source]

Stores a snapshot of the current value.

abstract merge(other)[source]

Combines two aggregator values.

class opentelemetry.sdk.metrics.export.aggregate.CounterAggregator[source]

Bases: opentelemetry.sdk.metrics.export.aggregate.Aggregator

Aggregator for Counter metrics.

update(value)[source]

Updates the current with the new value.

take_checkpoint()[source]

Stores a snapshot of the current value.

merge(other)[source]

Combines two aggregator values.

class opentelemetry.sdk.metrics.export.aggregate.MinMaxSumCountAggregator[source]

Bases: opentelemetry.sdk.metrics.export.aggregate.Aggregator

Agregator for Measure metrics that keeps min, max, sum and count.

update(value)[source]

Updates the current with the new value.

take_checkpoint()[source]

Stores a snapshot of the current value.

merge(other)[source]

Combines two aggregator values.

class opentelemetry.sdk.metrics.export.aggregate.ObserverAggregator[source]

Bases: opentelemetry.sdk.metrics.export.aggregate.Aggregator

Same as MinMaxSumCount but also with last value.

update(value)[source]

Updates the current with the new value.

take_checkpoint()[source]

Stores a snapshot of the current value.

merge(other)[source]

Combines two aggregator values.

opentelemetry.sdk.metrics.export.aggregate.get_latest_timestamp(time_stamp, other_timestamp)[source]