elastic / elastic/apm-agent-python

metrics.base_metrics.Counter API

Ouverte
#490 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
agent-python
Langage dominant
Python
Étoiles
431
Forks
239
Merge moyen
5 j 10 h
PR mergées (30 j)
7

Description

Is Counter meant to guarantee monotonically increasing values? It doesn't at the moment, since there's both a `dec` method and an `inc` method that accepts negative values.

What's the reason behind not providing a direct value setter? Even if we require the value to be monotonically increasing, you could for example check the current value and raise an exception if the new value is less. If there were a setter, then the `GarbageMetrics.collect` method in https://github.com/elastic/apm-agent-python/pull/481 could be simplified.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.