prometheus / prometheus/client_python

Would it be nice to document `Registry`, `Collector` and metric classes?

Aperta
#803 1 commento 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
4.4k
Fork
876
Merge medio
8g 4h
PR unite (30g)
1

Descrizione

Hi guys. Thanks for providing this great library for making monitoring fun and easy in python. It's my Day 1 with this package. The README provided a very quick introduction but I was also puzzled at the following question:

  1. Seems we defined some metric classes, but not assigned to any other things. The web server was started but it seemed magical that the server somehow knows the metric class objects.

This puzzle was gone after I checked out the source codes (which is very fun to read, thanks!) and realized that there's a global REGISTRY object. The server app takes a registry object which is by default the global REGISTRY, and each Collector object, in the __init__ method, also accepts a registry object, which by default is also REGISTRY.

I think it would be nice if there could be some API reference sections/pages. I'd be glad to contribute such a section, but would like to hear any comment from the community, like the necessity, proposed format, etc.

Cheers!

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia esaminando il README e le aree del codice sorgente che contengono la REGISTRY globale, Registry, Collector, le classi delle metriche e l’applicazione server. Chiarisci l’ambito e il formato preferiti dalla community per il riferimento API prima di scrivere. Il lavoro è completo quando il riferimento concordato spiega come i registry e i collector collegano le classi delle metriche all’applicazione server.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.