prometheus / prometheus/client_python
[Question] Is "REGISTRY" meant to be a decorator for "Collectors"?
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 4.4k
- Forks
- 876
- Ø Merge
- 8 T. 4 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Browsing through the code I've found a function called write_to_textfile in the exposition module. This function signature looks like this:
def write_to_textfile(path, registry):
"""Write metrics to the given path.
pass
If you read the implementation of the function, turns out the expectation is not really a registry but instead anything that implements (something like an interface) the .collect() method.
Is that by design?
If so, would it be welcomed the addition of type hints throughout the code? I would be happy to add them and create a PR.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne im Expositionsmodul bei write_to_textfile und vergleiche dessen registry-Parameter mit dem im Issue beschriebenen Verhalten von .collect(). Bevor du Änderungen vornimmst, kläre, ob Typannotationen im gesamten Python-Codebestand gewünscht sind; dafür wären ein vereinbarter Umfang und eine Entscheidung der Maintainer erforderlich.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- observability-sre
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100