elastic / elastic/apm-agent-python

metrics.base_metrics.Counter API

Offen
#490 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
agent-python
Vorherrschende Sprache
Python
Sterne
431
Forks
239
Ø Merge
5 T. 10 Std.
Gemergte PRs (30 T.)
7

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.