prometheus / prometheus/client_python
[Question] Is "REGISTRY" meant to be a decorator for "Collectors"?
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 4.4k
- Fork
- 876
- Merge medio
- 8g 4h
- PR unite (30g)
- 1
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia nel modulo di esposizione, in write_to_textfile, e confronta il suo parametro registry con il comportamento di .collect() descritto nell’issue. Prima di apportare modifiche, determina se le annotazioni di tipo sono desiderate nell’intera codebase Python; farlo richiederebbe concordare l’ambito e una decisione dei maintainer.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- observability-sre
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100