opentelemetry.sdk.metrics.export.aggregate

class opentelemetry.sdk.metrics.export.aggregate.Aggregator(config=None)[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.SumAggregator(config=None)[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(config=None)[source]

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

Aggregator for ValueRecorder metrics that keeps min, max, sum, 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.HistogramAggregator(config=None)[source]

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

Aggregator for ValueRecorder metrics that keeps a histogram of values.

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.LastValueAggregator(config=None)[source]

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

Aggregator that stores last value results.

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.ValueObserverAggregator(config=None)[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.